Fixed bus error. Removed inline functions. Minor cleanup.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5500 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bfb6f23c72
commit
9e98fd1252
6 changed files with 12 additions and 20 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
char cvsroot_allocate_cxx[] = "$Header$";
|
char cvsroot_allocate_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
#include "utils.h"
|
|
||||||
static int virtual_elimination_mode = 0; /* set to 0 on default */
|
static int virtual_elimination_mode = 0; /* set to 0 on default */
|
||||||
|
|
||||||
/* Set virtual_elimination_mode */
|
/* Set virtual_elimination_mode */
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
char cvsroot_emit_cxx[] = "$Header$";
|
char cvsroot_emit_cxx[] = "$Header$";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
char cvsroot_lang_cxx[] = "$Header$";
|
char cvsroot_lang_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
#include "utils.h"
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
static int director_protected_mode = 0; /* set to 0 on default */
|
static int director_protected_mode = 0; /* set to 0 on default */
|
||||||
|
|
|
||||||
|
|
@ -301,13 +301,16 @@ extern "C" {
|
||||||
void Swig_register_module(const char *name, ModuleFactory fac);
|
void Swig_register_module(const char *name, ModuleFactory fac);
|
||||||
ModuleFactory Swig_find_module(const char *name);
|
ModuleFactory Swig_find_module(const char *name);
|
||||||
|
|
||||||
|
/* Utilities */
|
||||||
|
|
||||||
|
extern int is_public(Node* n);
|
||||||
|
extern int is_private(Node* n);
|
||||||
|
extern int is_protected(Node* n);
|
||||||
|
extern int is_member_director(Node* parentnode, Node* member);
|
||||||
|
extern int is_member_director(Node* member);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
char cvsroot_typepass_cxx[] = "$Header$";
|
char cvsroot_typepass_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
struct normal_node {
|
struct normal_node {
|
||||||
Symtab *symtab;
|
Symtab *symtab;
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,32 @@
|
||||||
#ifndef __Modules_utils_h__
|
|
||||||
#define __Modules_utils_h__
|
|
||||||
|
|
||||||
|
#include <swigmod.h>
|
||||||
|
|
||||||
inline
|
|
||||||
int is_public(Node* n)
|
int is_public(Node* n)
|
||||||
{
|
{
|
||||||
String* access = Getattr(n, "access");
|
String* access = Getattr(n, "access");
|
||||||
return !access || !Cmp(access, "public");
|
return !access || !Cmp(access, "public");
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
int is_private(Node* n)
|
int is_private(Node* n)
|
||||||
{
|
{
|
||||||
String* access = Getattr(n, "access");
|
String* access = Getattr(n, "access");
|
||||||
return access && !Cmp(access, "private");
|
return access && !Cmp(access, "private");
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
int is_protected(Node* n)
|
int is_protected(Node* n)
|
||||||
{
|
{
|
||||||
String* access = Getattr(n, "access");
|
String* access = Getattr(n, "access");
|
||||||
return access && !Cmp(access, "protected");
|
return access && !Cmp(access, "protected");
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
int is_member_director(Node* parentnode, Node* member)
|
int is_member_director(Node* parentnode, Node* member)
|
||||||
{
|
{
|
||||||
int parent_director = !Cmp(Getattr(parentnode,"feature:director"), "1");
|
int parent_director = parentnode && checkAttribute(parentnode,"feature:director","1");
|
||||||
int cdecl_nodirector = !Cmp(Getattr(member,"feature:nodirector"),"1");
|
int cdecl_nodirector = checkAttribute(member,"feature:nodirector","1");
|
||||||
return parent_director && !cdecl_nodirector;
|
return parent_director && !cdecl_nodirector;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
int is_member_director(Node* member)
|
int is_member_director(Node* member)
|
||||||
{
|
{
|
||||||
return is_member_director(Getattr(member, "parentNode"), member);
|
return is_member_director(Getattr(member, "parentNode"), member);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__Modules_utils_h__
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue