@@ -276,6 +276,60 @@ void call_with_variant_args_retc_helper(T *p_instance, R (T::*p_method)(P...) co
276276(void )p_args;
277277}
278278
279+ template  <class  T , class ... P>
280+ void  call_with_variant_args (T *p_instance, void  (T::*p_method)(P...), const  Variant **p_args, int p_argcount, GDExtensionCallError &r_error) {
281+ #ifdef  DEBUG_ENABLED
282+ if  ((size_t )p_argcount > sizeof ...(P)) {
283+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS;
284+ r_error.argument  = (int32_t )sizeof ...(P);
285+ return ;
286+ }
287+ 
288+ if  ((size_t )p_argcount < sizeof ...(P)) {
289+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS;
290+ r_error.argument  = (int32_t )sizeof ...(P);
291+ return ;
292+ }
293+ #endif 
294+ call_with_variant_args_helper<T, P...>(p_instance, p_method, p_args, r_error, BuildIndexSequence<sizeof ...(P)>{});
295+ }
296+ 
297+ template  <class  T , class  R , class ... P>
298+ void  call_with_variant_args_ret (T *p_instance, R (T::*p_method)(P...), const  Variant **p_args, int p_argcount, Variant &r_ret, GDExtensionCallError &r_error) {
299+ #ifdef  DEBUG_ENABLED
300+ if  ((size_t )p_argcount > sizeof ...(P)) {
301+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS;
302+ r_error.argument  = (int32_t )sizeof ...(P);
303+ return ;
304+ }
305+ 
306+ if  ((size_t )p_argcount < sizeof ...(P)) {
307+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS;
308+ r_error.argument  = (int32_t )sizeof ...(P);
309+ return ;
310+ }
311+ #endif 
312+ call_with_variant_args_ret_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, r_error, BuildIndexSequence<sizeof ...(P)>{});
313+ }
314+ 
315+ template  <class  T , class  R , class ... P>
316+ void  call_with_variant_args_retc (T *p_instance, R (T::*p_method)(P...) const , const  Variant **p_args, int p_argcount, Variant &r_ret, GDExtensionCallError &r_error) {
317+ #ifdef  DEBUG_ENABLED
318+ if  ((size_t )p_argcount > sizeof ...(P)) {
319+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS;
320+ r_error.argument  = (int32_t )sizeof ...(P);
321+ return ;
322+ }
323+ 
324+ if  ((size_t )p_argcount < sizeof ...(P)) {
325+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS;
326+ r_error.argument  = (int32_t )sizeof ...(P);
327+ return ;
328+ }
329+ #endif 
330+ call_with_variant_args_retc_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, r_error, BuildIndexSequence<sizeof ...(P)>{});
331+ }
332+ 
279333template  <class  T , class ... P>
280334void  call_with_variant_args_dv (T *p_instance, void  (T::*p_method)(P...), const  GDExtensionConstVariantPtr *p_args, int p_argcount, GDExtensionCallError &r_error, const  std::vector<Variant> &default_values) {
281335#ifdef  DEBUG_ENABLED
@@ -538,6 +592,42 @@ void call_with_ptr_args_static_method(void (*p_method)(P...), const GDExtensionC
538592call_with_ptr_args_static_method_helper<P...>(p_method, p_args, BuildIndexSequence<sizeof ...(P)>{});
539593}
540594
595+ template  <class  R , class ... P>
596+ void  call_with_variant_args_static_ret (R (*p_method)(P...), const  Variant **p_args, int p_argcount, Variant &r_ret, GDExtensionCallError &r_error) {
597+ #ifdef  DEBUG_ENABLED
598+ if  ((size_t )p_argcount > sizeof ...(P)) {
599+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS;
600+ r_error.argument  = (int32_t )sizeof ...(P);
601+ return ;
602+ }
603+ 
604+ if  ((size_t )p_argcount < sizeof ...(P)) {
605+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS;
606+ r_error.argument  = (int32_t )sizeof ...(P);
607+ return ;
608+ }
609+ #endif 
610+ call_with_variant_args_static_ret<R, P...>(p_method, p_args, r_ret, r_error, BuildIndexSequence<sizeof ...(P)>{});
611+ }
612+ 
613+ template  <class ... P>
614+ void  call_with_variant_args_static_ret (void  (*p_method)(P...), const  Variant **p_args, int p_argcount, Variant &r_ret, GDExtensionCallError &r_error) {
615+ #ifdef  DEBUG_ENABLED
616+ if  ((size_t )p_argcount > sizeof ...(P)) {
617+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS;
618+ r_error.argument  = (int32_t )sizeof ...(P);
619+ return ;
620+ }
621+ 
622+ if  ((size_t )p_argcount < sizeof ...(P)) {
623+ r_error.error  = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS;
624+ r_error.argument  = (int32_t )sizeof ...(P);
625+ return ;
626+ }
627+ #endif 
628+ call_with_variant_args_static<P...>(p_method, p_args, r_error, BuildIndexSequence<sizeof ...(P)>{});
629+ }
630+ 
541631template  <class  R , class ... P, size_t ... Is>
542632void  call_with_variant_args_static_ret (R (*p_method)(P...), const  Variant **p_args, Variant &r_ret, GDExtensionCallError &r_error, IndexSequence<Is...>) {
543633r_error.error  = GDEXTENSION_CALL_OK;
0 commit comments