Merge pull request #467 from vadz/no-callback-in-autodoc

Remove callback function from autodoc unit test.
This commit is contained in:
William S Fulton 2015-07-24 23:07:54 +01:00
commit 3ab7315cf9
5 changed files with 19 additions and 16 deletions

View file

@ -114,12 +114,6 @@
}
%}
%callback("%(uppercase)s_CALLBACK") func_cb;
%inline {
int func_cb(int c, int d) { return c; }
}
// Bug 3310528
%feature("autodoc","1") banana; // names + types
%inline %{

View file

@ -1,10 +1,18 @@
%module callback
// Not specifying the callback name is only possible in Python.
#ifdef SWIGPYTHON
%callback(1) foo;
%callback(1) foof;
%callback(1) A::bar;
%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 %{

View file

@ -10,6 +10,7 @@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
CPP_TEST_CASES += \
callback \
php_iterator \
php_namewarn_rename \

View file

@ -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();
?>

View 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();
?>