*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@20 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2009a6dcc6
commit
546867ac9d
4 changed files with 17 additions and 6 deletions
|
|
@ -9,8 +9,8 @@
|
|||
# Set your C++ compiler here. g++ works on most machines,
|
||||
# but you might have to change it depending on your installation.
|
||||
#
|
||||
CC = cc
|
||||
prefix = /usr/local
|
||||
CC = gcc
|
||||
prefix = /home/beazley/SWIG1.2
|
||||
|
||||
# Comment out the following line if you're on an SGI or don't have ranlib!
|
||||
RANLIB = ranlib
|
||||
|
|
|
|||
|
|
@ -87,13 +87,13 @@ static DOH *find_internal(DOH *co) {
|
|||
if (DohCheck(co)) return co;
|
||||
c = (char *) co;
|
||||
if (doh_debug_level) {
|
||||
DohError(DOH_CONVERSION,"Unknown object %x being treated as 'char *'.\n", c);
|
||||
DohError(DOH_CONVERSION,"Unknown object '%s' being treated as 'char *'.\n", c);
|
||||
}
|
||||
r = root;
|
||||
s = 0;
|
||||
while (r) {
|
||||
s = r;
|
||||
/* printf("checking %s\n", r->cstr);*/
|
||||
// printf("checking %s\n", r->cstr);
|
||||
d = strcmp(r->cstr,c);
|
||||
if (d == 0) return r->sstr;
|
||||
if (d < 0) r = r->left;
|
||||
|
|
@ -350,6 +350,7 @@ DOH *DohGetattr(DOH *obj, DOH *name) {
|
|||
DOH *name_obj;
|
||||
DohBase *b = (DohBase *) obj;
|
||||
DohError(DOH_CALLS,"DohGetattr %x, %x\n",obj,name);
|
||||
if (!name) return 0;
|
||||
if (DohIsMapping(b)) {
|
||||
name_obj = find_internal(name);
|
||||
if (b->objinfo->doh_mapping->doh_getattr) {
|
||||
|
|
@ -370,6 +371,7 @@ int DohSetattr(DOH *obj, DOH *name, DOH *value) {
|
|||
DOH *name_obj, *value_obj;
|
||||
DohBase *b = (DohBase *) obj;
|
||||
DohError(DOH_CALLS,"DohSetattr %x, %x, %x\n",obj,name, value);
|
||||
if ((!name) || (!value)) return 0;
|
||||
if (DohIsMapping(b)) {
|
||||
name_obj = find_internal(name);
|
||||
if (!DohCheck(value)) {
|
||||
|
|
@ -395,6 +397,7 @@ void DohDelattr(DOH *obj, DOH *name) {
|
|||
DOH *name_obj;
|
||||
DohBase *b = (DohBase *) obj;
|
||||
DohError(DOH_CALLS,"DohDelattr %x, %x\n",obj,name);
|
||||
if (!name) return;
|
||||
if (DohIsMapping(obj)) {
|
||||
name_obj = find_internal(name);
|
||||
if (b->objinfo->doh_mapping->doh_delattr) {
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ String_cmp(DOH *so1, DOH *so2)
|
|||
if (s2->len < maxlen) maxlen = s2->len;
|
||||
c1 = s1->str;
|
||||
c2 = s2->str;
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < maxlen; i++,c1++,c2++) {
|
||||
if (*c1 != *c2) break;
|
||||
}
|
||||
if (i < maxlen) {
|
||||
|
|
@ -268,7 +268,7 @@ int String_hash(DOH *so) {
|
|||
String *s = (String *) so;
|
||||
char *c;
|
||||
int i, h = 0, len;
|
||||
/* if (s->hashkey >= 0) return s->hashkey; */
|
||||
if (s->hashkey >= 0) return s->hashkey;
|
||||
c = s->str;
|
||||
len = s->len > 50 ? 50 : s->len;
|
||||
for (i = 0; i < len; i++) {
|
||||
|
|
@ -716,3 +716,4 @@ String_replace(DOH *stro, DOH *token, DOH *rep, int flags)
|
|||
if (flags & DOH_REPLACE_FIRST) count = 1;
|
||||
replace_internal(str,Char(token),Char(rep),flags,str->str,count);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
#define DOH_MAJOR_VERSION 0
|
||||
#define DOH_MINOR_VERSION 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void DOH;
|
||||
|
||||
#define DOH_BEGIN -1
|
||||
|
|
@ -309,5 +313,8 @@ extern DOH *DohSplit(DOH *input, char *chs, int nsplits);
|
|||
#define DOH_CONVERSION 5
|
||||
#define DOH_CALLS 10
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue