Fix newobject3 testcase

Fixes Octave problem which has a template called product.
This commit is contained in:
William S Fulton 2017-10-10 08:05:21 +01:00
commit 08210236ef
5 changed files with 158 additions and 11 deletions

View file

@ -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;
}
%}