Merge pull request #467 from vadz/no-callback-in-autodoc
Remove callback function from autodoc unit test.
This commit is contained in:
commit
3ab7315cf9
5 changed files with 19 additions and 16 deletions
|
|
@ -114,12 +114,6 @@
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%callback("%(uppercase)s_CALLBACK") func_cb;
|
|
||||||
|
|
||||||
%inline {
|
|
||||||
int func_cb(int c, int d) { return c; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bug 3310528
|
// Bug 3310528
|
||||||
%feature("autodoc","1") banana; // names + types
|
%feature("autodoc","1") banana; // names + types
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,18 @@
|
||||||
%module callback
|
%module callback
|
||||||
|
|
||||||
|
// Not specifying the callback name is only possible in Python.
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
%callback(1) foo;
|
%callback(1) foo;
|
||||||
%callback(1) foof;
|
%callback(1) foof;
|
||||||
%callback(1) A::bar;
|
%callback(1) A::bar;
|
||||||
%callback(1) A::foom;
|
%callback(1) A::foom;
|
||||||
%callback("%s_Cb_Ptr") foo_T; // old style, still works.
|
#else
|
||||||
|
%callback("%s") foo;
|
||||||
|
%callback("%s") foof;
|
||||||
|
%callback("%s") A::bar;
|
||||||
|
%callback("%s") A::foom;
|
||||||
|
#endif
|
||||||
|
%callback("%(uppercase)s_Cb_Ptr") foo_T; // this works in Python too
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ top_srcdir = @top_srcdir@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
|
|
||||||
CPP_TEST_CASES += \
|
CPP_TEST_CASES += \
|
||||||
|
callback \
|
||||||
php_iterator \
|
php_iterator \
|
||||||
php_namewarn_rename \
|
php_namewarn_rename \
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require "tests.php";
|
|
||||||
require "autodoc.php";
|
|
||||||
// In 2.0.6 and earlier, the constant was misnamed.
|
|
||||||
if (gettype(autodoc::FUNC_CB_CALLBACK) !== 'resource') die("autodoc::FUNC_CB_CALLBACK not a resource\n");
|
|
||||||
|
|
||||||
check::done();
|
|
||||||
?>
|
|
||||||
9
Examples/test-suite/php/callback_runme.php
Normal file
9
Examples/test-suite/php/callback_runme.php
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require "tests.php";
|
||||||
|
require "callback.php";
|
||||||
|
// In 2.0.6 and earlier, the constant was misnamed.
|
||||||
|
if (gettype(callback::FOO_I_Cb_Ptr) !== 'resource') die("callback::foo_T<int> not a resource\n");
|
||||||
|
|
||||||
|
check::done();
|
||||||
|
?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue