Parcourir la Source

add a note to push a dummy value for sq_call when constructing an instance. this just cost me a lot of time!

zeromus il y a 9 ans
Parent
commit
78b44c851b
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 2 3
      doc/source/reference/api/calls.rst

+ 2 - 3
doc/source/reference/api/calls.rst

@@ -13,11 +13,10 @@ Calls
     :param SQBool retval: if true the function will push the return value in the stack
     :param SQBool raiseerror: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler.
     :returns: a SQRESULT
-    :remarks: the function pops all the parameters and leave the closure in the stack; if retval is true the return value of the closure is pushed. If the execution of the function is suspended through sq_suspendvm(), the closure and the arguments will not be automatically popped from the stack.
-
-calls a closure or a native closure.
 
+calls a closure or a native closure. The function pops all the parameters and leave the closure in the stack; if retval is true the return value of the closure is pushed. If the execution of the function is suspended through sq_suspendvm(), the closure and the arguments will not be automatically popped from the stack.
 
+When using to create an instance, push a dummy parameter to be filled with the newly-created instance for the constructor's 'this' parameter.