Fix newobject3 testcase
Fixes Octave problem which has a template called product.
This commit is contained in:
parent
e7f0c6d6ad
commit
08210236ef
5 changed files with 158 additions and 11 deletions
|
|
@ -6,20 +6,20 @@
|
|||
|
||||
%newobject factory::create;
|
||||
%inline %{
|
||||
class product {};
|
||||
class Product {};
|
||||
class factory {
|
||||
public:
|
||||
product * create(short id, short type = 0);
|
||||
product * create(const char * name, short type = 0);
|
||||
Product * create(short id, short type = 0);
|
||||
Product * create(const char * name, short type = 0);
|
||||
};
|
||||
%}
|
||||
|
||||
%{
|
||||
product * factory::create(short id, short type) {
|
||||
return (id && type >= 0) ? new product : NULL;
|
||||
Product * factory::create(short id, short type) {
|
||||
return (id && type >= 0) ? new Product : NULL;
|
||||
}
|
||||
|
||||
product * factory::create(const char * name, short type) {
|
||||
return (name && type >= 0) ? new product : NULL;
|
||||
Product * factory::create(const char * name, short type) {
|
||||
return (name && type >= 0) ? new Product : NULL;
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue