more centralization of swigkeys
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f3f56ee734
commit
3f50cdc914
4 changed files with 23 additions and 8 deletions
|
|
@ -246,7 +246,7 @@ static String *make_name(Node *n, String *name,SwigType *decl) {
|
|||
if (!name) return 0;
|
||||
/* Check to see if the name is in the hash */
|
||||
if (inclass) {
|
||||
Setattr(n,"parentNode",current_class);
|
||||
set_parentNode(n,current_class);
|
||||
}
|
||||
return Swig_name_make(n,Namespaceprefix,name,decl,add_oldname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,13 +353,13 @@ extern ParmList *ParmList_copy_all_except_last_parm(ParmList *p);
|
|||
/* --- Parse tree support --- */
|
||||
|
||||
/* DOM-like node access */
|
||||
|
||||
#define nodeType(x) Getattr(x,"nodeType")
|
||||
#define parentNode(x) Getattr(x,"parentNode")
|
||||
#define previousSibling(x) Getattr(x,"previousSibling")
|
||||
#define nextSibling(x) Getattr(x,"nextSibling")
|
||||
#define firstChild(x) Getattr(x,"firstChild")
|
||||
#define lastChild(x) Getattr(x,"lastChild")
|
||||
#include "swigkeys.h"
|
||||
#define nodeType(x) Getattr(x,k_nodetype)
|
||||
#define parentNode(x) Getattr(x,k_parentnode)
|
||||
#define previousSibling(x) Getattr(x,k_previoussibling)
|
||||
#define nextSibling(x) Getattr(x,k_nextsibling)
|
||||
#define firstChild(x) Getattr(x,k_firstchild)
|
||||
#define lastChild(x) Getattr(x,k_lastchild)
|
||||
extern int checkAttribute(Node *obj, const String_or_char *name, const String_or_char *value);
|
||||
|
||||
/* Macros to set up the DOM tree (mostly used by the parser) */
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ String *k_wrapdirectormap = 0;
|
|||
String *k_wrapdisown = 0;
|
||||
String *k_wrapper = 0;
|
||||
|
||||
String *k_previoussibling = 0;
|
||||
String *k_nextsibling = 0;
|
||||
String *k_firstchild = 0;
|
||||
String *k_lastchild = 0;
|
||||
|
||||
void Swig_keys_init() {
|
||||
empty_string = NewString("");
|
||||
k_1 = NewString("1");
|
||||
|
|
@ -227,4 +232,10 @@ void Swig_keys_init() {
|
|||
k_wrapdirectormap = NewString("wrap:directormap");
|
||||
k_wrapdisown = NewString("wrap:disown");
|
||||
k_wrapper = NewString("wrapper");
|
||||
|
||||
|
||||
k_previoussibling = NewString("previousSibling");
|
||||
k_nextsibling = NewString("nextSibling");
|
||||
k_firstchild = NewString("firstChild");
|
||||
k_lastchild = NewString("lastChild");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,4 +119,8 @@ extern String *k_wrapdirectormap;
|
|||
extern String *k_wrapdisown;
|
||||
extern String *k_wrapper;
|
||||
|
||||
extern String *k_previoussibling;
|
||||
extern String *k_nextsibling;
|
||||
extern String *k_firstchild;
|
||||
extern String *k_lastchild;
|
||||
#endif /* __Swig_swigkeys_h__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue