Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

scilab: rename swig_this(), swig_ptr() to SWIG_this(), SWIG_ptr()

  • Loading branch information...
commit 821118de9b688a500a55eee7e34abc3a7491dc93 1 parent 89d9cdb
@smarchetto smarchetto authored
View
14 Doc/Manual/Scilab.html
@@ -747,8 +747,8 @@
<p>
SWIG comes with two pointer utility functions:
<ul>
-<li><tt>swig_this()</tt>: returns the address value of a pointer</li>
-<li><tt>swig_ptr()</tt>: creates a pointer from an address value</li>
+<li><tt>SWIG_this()</tt>: returns the address value of a pointer</li>
+<li><tt>SWIG_ptr()</tt>: creates a pointer from an address value</li>
</ul>
</p>
@@ -757,12 +757,12 @@
<div class="targetlang"><pre>
--&gt; f = fopen("junk", "w");
--&gt; fputs("Hello", f);
---&gt; addr = swig_this(f)
+--&gt; addr = SWIG_this(f)
ans =
8219088.
---&gt; p = swig_ptr(addr);
+--&gt; p = SWIG_ptr(addr);
--&gt; fputs(" World", p);
--&gt; fclose(f);
</pre></div>
@@ -770,12 +770,12 @@
<H4><a name="Scilab_wrapping_pointers_null_pointers"></a>Null pointers</H4>
<p>By default, Scilab does not provide a way to test or create null pointers.
-But it is possible to have a null pointer by using the previous functions <tt>swig_this()</tt> and <tt>swig_ptr()</tt>, like this:
+But it is possible to have a null pointer by using the previous functions <tt>SWIG_this()</tt> and <tt>SWIG_ptr()</tt>, like this:
</p>
<div class="targetlang"><pre>
---&gt; p = swig_ptr(0);
---&gt; swig_this(p) == 0
+--&gt; p = SWIG_ptr(0);
+--&gt; SWIG_this(p) == 0
ans =
T
View
2  Examples/test-suite/scilab/null_pointer_runme.sci
@@ -1,7 +1,7 @@
exec("swigtest.start", -1);
p = getnull();
-checkequal(swig_this(p), 0, "swig_this(p)");
+checkequal(SWIG_this(p), 0, "SWIG_this(p)");
checkequal(func(p), %T, "func(p)");
exec("swigtest.quit", -1);
View
2  Examples/test-suite/scilab/overload_complicated_runme.sci
@@ -1,6 +1,6 @@
exec("swigtest.start", -1);
-NULL = swig_ptr(0);
+NULL = SWIG_ptr(0);
p = new_Pop(NULL);
p = new_Pop(NULL, %T);
View
10 Examples/test-suite/scilab/scilab_pointer_conversion_functions_runme.sci
@@ -2,17 +2,17 @@ exec("swigtest.start", -1);
// Test on NULL
null = getNull();
-checkequal(swig_this(null), 0, "swig_this(null)");
+checkequal(SWIG_this(null), 0, "SWIG_this(null)");
-null = swig_ptr(0);
+null = SWIG_ptr(0);
checkequal(isNull(null), %T, "func(null)");
// Test on variable
expected_foo_addr = getFooAddress();
-foo_addr = swig_this(pfoo_get());
-checkequal(foo_addr, expected_foo_addr, "swig_this(pfoo_get())");
+foo_addr = SWIG_this(pfoo_get());
+checkequal(foo_addr, expected_foo_addr, "SWIG_this(pfoo_get())");
-pfoo = swig_ptr(foo_addr);
+pfoo = SWIG_ptr(foo_addr);
checkequal(equalFooPointer(pfoo), %T, "equalFooPointer(pfoo)");
exec("swigtest.quit", -1);
View
6 Examples/test-suite/scilab/voidtest_runme.sci
@@ -8,13 +8,13 @@ Foo_memberfunc(f);
Foo_staticmemberfunc();
v1 = vfunc1(f);
-checkequal(swig_this(v1), swig_this(f), "vfunc1(f) <> f");
+checkequal(SWIG_this(v1), SWIG_this(f), "vfunc1(f) <> f");
v2 = vfunc2(f);
-checkequal(swig_this(v2), swig_this(f), "vfunc2(f) <> f");
+checkequal(SWIG_this(v2), SWIG_this(f), "vfunc2(f) <> f");
v3 = vfunc3(v1);
-checkequal(swig_this(v3), swig_this(f), "vfunc3(f) <> f");
+checkequal(SWIG_this(v3), SWIG_this(f), "vfunc3(f) <> f");
Foo_memberfunc(v3);
View
4 Lib/scilab/scirun.swg
@@ -267,7 +267,7 @@ SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) {
#ifdef __cplusplus
extern "C"
#endif
-int swig_this(SWIG_GatewayParameters) {
+int SWIG_this(SWIG_GatewayParameters) {
void *ptrValue = NULL;
if (SwigScilabPtrToObject(pvApiCtx, 1, &ptrValue, NULL, 0, fname) == SWIG_OK) {
SWIG_Scilab_SetOutputPosition(1);
@@ -284,7 +284,7 @@ int swig_this(SWIG_GatewayParameters) {
#ifdef __cplusplus
extern "C"
#endif
-int swig_ptr(SWIG_GatewayParameters) {
+int SWIG_ptr(SWIG_GatewayParameters) {
double dValue = 0;
int *piAddr;
SciErr sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
View
4 Source/Modules/scilab.cxx
@@ -750,8 +750,8 @@ class SCILAB:public Language {
* addHelperFunctions()
* ----------------------------------------------------------------------- */
void addHelperFunctions() {
- addFunctionToScilab("swig_this", "swig_this");
- addFunctionToScilab("swig_ptr", "swig_ptr");
+ addFunctionToScilab("SWIG_this", "SWIG_this");
+ addFunctionToScilab("SWIG_ptr", "SWIG_ptr");
}
/* -----------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.