mirror of https://github.com/swig/swig
Fix typos
This commit is contained in:
parent
b415f566a0
commit
40c3bf30b2
|
@ -2991,7 +2991,7 @@ virtual int functionWrapper(Node *n) {
|
|||
/* create the wrapper object */
|
||||
Wrapper *wrapper = NewWrapper();
|
||||
|
||||
/* create the functions wrappered name */
|
||||
/* create the functions wrapped name */
|
||||
String *wname = Swig_name_wrapper(iname);
|
||||
|
||||
/* deal with overloading */
|
||||
|
|
|
@ -2136,7 +2136,7 @@ struct A {
|
|||
|
||||
<p>
|
||||
and you want to provide that variable as an attribute in the target
|
||||
langage. This example only works for primitive types, not derived
|
||||
language. This example only works for primitive types, not derived
|
||||
types.
|
||||
Now you can use the attributes like so (in Python):
|
||||
</p>
|
||||
|
|
|
@ -375,7 +375,7 @@ then the default "compat" setting should work well.
|
|||
</p>
|
||||
|
||||
<p>
|
||||
If you're writing a new set of bindings and <b>only targetting PHP8 or newer</b>
|
||||
If you're writing a new set of bindings and <b>only targeting PHP8 or newer</b>
|
||||
then enabling type declarations everywhere probably makes sense. It will
|
||||
only actually make a difference if you enable directors and are wrapping C++
|
||||
classes with virtual methods, but doing it anyway means you won't forget to if
|
||||
|
|
|
@ -768,7 +768,7 @@ Pointers are supported by SWIG. A pointer can be returned from a wrapped C/C++ f
|
|||
Also, thanks to the SWIG runtime which stores information about types, pointer types are tracked between exchanges Scilab and the native code. Indeed pointer types are stored alongside the pointer address.
|
||||
A pointer is mapped to a Scilab structure (<a href="https://help.scilab.org/docs/5.5.2/en_US/tlist.html">tlist</a>), which contains as fields the pointer address and the pointer type (in fact a pointer to the type information structure in the SWIG runtime).
|
||||
<br>
|
||||
Why a native pointer is not mapped to a Scilab pointer (type name: "pointer", type ID: 128) ? The big advantage of mapping to a <tt>tlist</tt> is that it exposes a new type for the pointer in Scilab, type which can be acessed in Scilab with the <a href="https://help.scilab.org/docs/5.5.2/en_US/typeof.html">typeof</a> function, and manipulated using the <a href="https://help.scilab.org/docs/5.5.2/en_US/overloading.html">overloading</a> mechanism.
|
||||
Why a native pointer is not mapped to a Scilab pointer (type name: "pointer", type ID: 128) ? The big advantage of mapping to a <tt>tlist</tt> is that it exposes a new type for the pointer in Scilab, type which can be accessed in Scilab with the <a href="https://help.scilab.org/docs/5.5.2/en_US/typeof.html">typeof</a> function, and manipulated using the <a href="https://help.scilab.org/docs/5.5.2/en_US/overloading.html">overloading</a> mechanism.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -776,7 +776,7 @@ Notes:
|
|||
</p>
|
||||
<ul>
|
||||
<li>type tracking needs the SWIG runtime to be first initialized with the appropriate function (see the <a href="#Scilab_module_initialization">Module initialization</a> section).</li>
|
||||
<li>for any reason, if a wrapped pointer type is unknown (or if the SWIG runtime is not initialized), SWIG maps it to a Scilab pointer. Also, a Scilab pointer is always accepted as a pointer argument of a wrapped function. The drawaback is that pointer type is lost.</li>
|
||||
<li>for any reason, if a wrapped pointer type is unknown (or if the SWIG runtime is not initialized), SWIG maps it to a Scilab pointer. Also, a Scilab pointer is always accepted as a pointer argument of a wrapped function. The drawback is that pointer type is lost.</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -23,7 +23,7 @@ We will be using the luaL_dostring()/lua_dostring() function to call into lua
|
|||
#define lua_open luaL_newstate
|
||||
#endif
|
||||
|
||||
/* the SWIG wrappered library */
|
||||
/* the SWIG wrapped library */
|
||||
extern int luaopen_example(lua_State*L);
|
||||
|
||||
/* a really simple way of calling lua from C
|
||||
|
|
|
@ -186,7 +186,7 @@ int main(int argc,char* argv[]) {
|
|||
luaopen_base(L);
|
||||
luaopen_string(L);
|
||||
luaopen_math(L);
|
||||
printf("[C] now loading the SWIG wrappered library\n");
|
||||
printf("[C] now loading the SWIG wrapped library\n");
|
||||
luaopen_example(L);
|
||||
printf("[C] all looks ok\n");
|
||||
printf("\n");
|
||||
|
@ -226,8 +226,8 @@ int main(int argc,char* argv[]) {
|
|||
printf("\n");
|
||||
printf("[C] Note: no protection if you mess up the va-args, this is C\n");
|
||||
printf("\n");
|
||||
printf("[C] Finally we will call the wrappered gcd function gdc(6,9):\n");
|
||||
printf("[C] This will pass the values to Lua, then call the wrappered function\n");
|
||||
printf("[C] Finally we will call the wrapped gcd function gdc(6,9):\n");
|
||||
printf("[C] This will pass the values to Lua, then call the wrapped function\n");
|
||||
printf(" Which will get the values from Lua, call the C code \n");
|
||||
printf(" and return the value to Lua and eventually back to C\n");
|
||||
printf("[C] Certainly not the best way to do it :-)\n");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This case might happen for two different reasons:
|
||||
* 1) Importing a module for which the .i file is in a subdirectory relatively
|
||||
* to this file (this is tested here with go_subdir_import_c).
|
||||
* 2) Importing a module whos module name is a path (this is tested here with
|
||||
* 2) Importing a module whose module name is a path (this is tested here with
|
||||
* go_subdir_import_b).
|
||||
*
|
||||
* This file is the "root" file that imports the two modules which will be
|
||||
|
|
|
@ -36,7 +36,7 @@ test_const_pointer(cobj)
|
|||
-- swig doesn't appear to diff between const object ptrs & object ptrs very well
|
||||
test_pointer(cobj) -- this wants an non const object (give it a const one!)
|
||||
|
||||
-- refs are also wrappered as ptrs (unless the correct typemaps are applied)
|
||||
-- refs are also wrapped as ptrs (unless the correct typemaps are applied)
|
||||
robj=test_reference_out()
|
||||
assert(is_std_string(robj) and robj:c_str()=="test_reference_out message") -- check type & value
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
ZEND_BEGIN_ARG_INFO_EX(name, 0, byref, num_req)
|
||||
|
||||
/* NB We can just ignore `default` here we currently always pass NULL for it
|
||||
* (this mechnism for specifying default parameter values was new in PHP 8.0
|
||||
* (this mechanism for specifying default parameter values was new in PHP 8.0
|
||||
* so it's not useful while we still want to support PHP7 too).
|
||||
*/
|
||||
# define ZEND_ARG_OBJ_TYPE_MASK(byref, name, classes, types, default) \
|
||||
|
|
|
@ -1278,7 +1278,7 @@ static void typemap_merge_fragment_kwargs(Parm *kw) {
|
|||
fragment = thisfragment;
|
||||
prev_kw = kw;
|
||||
} else {
|
||||
/* Concatentate to previously found fragment */
|
||||
/* Concatenate to previously found fragment */
|
||||
Printv(fragment, ",", thisfragment, NULL);
|
||||
reattach_kw = prev_kw;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue