User forums > Nightly builds

The 12 january 2007 build will NOT be out.

<< < (2/3) > >>

pasgui:
In the squirrel.h file, when I make this modification:

#ifdef _SQ64
#ifdef _MSC_VER
//typedef __int64 SQInteger;
typedef unsigned __int64 SQUnsignedInteger;
typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
#else
//typedef long SQInteger;
typedef unsigned long SQUnsignedInteger;
typedef unsigned long SQHash; /*should be the same size of a pointer*/
#endif
typedef int SQInt32;
#else
//typedef int SQInteger;
typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
typedef unsigned int SQUnsignedInteger;
typedef unsigned int SQHash; /*should be the same size of a pointer*/
#endif
typedef long SQInteger;

I got the same behavior, it look like it depends with _SQ64 _MSC_VER.

sc_dialog.cpp: In function 'SQInteger ScriptBindings::XrcId(SQVM*)':
sc_dialog.cpp:101: error: call of overloaded 'Return(int)' is ambiguous
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:182: note: candidates are: SQInteger StackHandler::Return(const SQChar*) <near match>
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:187: note:                 SQInteger StackHandler::Return(SQFloat)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:192: note:                 SQInteger StackHandler::Return(SQInteger)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:197: note:                 SQInteger StackHandler::Return(bool)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:202: note:                 SQInteger StackHandler::Return(void*) <near match>
sc_dialog.cpp:109: error: call of overloaded 'Return(wxWindowID)' is ambiguous
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:182: note: candidates are: SQInteger StackHandler::Return(const SQChar*) <near match>
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:187: note:                 SQInteger StackHandler::Return(SQFloat)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:192: note:                 SQInteger StackHandler::Return(SQInteger)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:197: note:                 SQInteger StackHandler::Return(bool)
../../../../src/sdk/scripting/sqplus/SquirrelObject.h:202: note:                 SQInteger StackHandler::Return(void*) <near match>
make: *** [sc_dialog.lo] Erreur 1

stahta01:
I think it is a error that happens on 64bit machines that define _LP64.
Tim S

killerbot:
yes I have on both 64 bit machines, staring to doubt if I had it on 32 bit, testing now, nope 32-bit ok

stahta01:
A patch that might fix it.

--- Code: ---Index: src/sdk/scripting/sqplus/SquirrelObject.h
===================================================================
--- src/sdk/scripting/sqplus/SquirrelObject.h (revision 3480)
+++ src/sdk/scripting/sqplus/SquirrelObject.h (working copy)
@@ -11,7 +11,7 @@
  SquirrelObject(HSQOBJECT o);
  SquirrelObject & operator =(const SquirrelObject &o);
  SquirrelObject & operator =(int n);
- void AttachToStackObject(int idx);
+ void AttachToStackObject(SQInteger idx);
   void Reset(void); // Release (any) reference and reset _o.
   SquirrelObject Clone();
  BOOL SetValue(const SquirrelObject &key,const SquirrelObject &val);
@@ -102,21 +102,21 @@
  _top = sq_gettop(v);
  this->v = v;
  }
- SQFloat GetFloat(int idx) {
+ SQFloat GetFloat(SQInteger idx) {
  SQFloat x = 0.0f;
  if(idx > 0 && idx <= _top) {
  sq_getfloat(v,idx,&x);
  }
  return x;
  }
- SQInteger GetInt(int idx) {
+ SQInteger GetInt(SQInteger idx) {
  SQInteger x = 0;
  if(idx > 0 && idx <= _top) {
  sq_getinteger(v,idx,&x);
  }
  return x;
  }
- HSQOBJECT GetObjectHandle(int idx) {
+ HSQOBJECT GetObjectHandle(SQInteger idx) {
  HSQOBJECT x;
  if(idx > 0 && idx <= _top) {
  sq_resetobject(&x);
@@ -124,7 +124,7 @@
  }
  return x;
  }
- const SQChar *GetString(int idx)
+ const SQChar *GetString(SQInteger idx)
  {
     const SQChar *x = NULL;
  if(idx > 0 && idx <= _top) {
@@ -132,7 +132,7 @@
  }
  return x;
  }
- SQUserPointer GetUserPointer(int idx)
+ SQUserPointer GetUserPointer(SQInteger idx)
  {
  SQUserPointer x = 0;
  if(idx > 0 && idx <= _top) {
@@ -140,14 +140,14 @@
  }
  return x;
  }
- SQUserPointer GetInstanceUp(int idx,SQUserPointer tag)
+ SQUserPointer GetInstanceUp(SQInteger idx,SQUserPointer tag)
  {
  SQUserPointer self;
  if(SQ_FAILED(sq_getinstanceup(v,idx,(SQUserPointer*)&self,tag)))
  return NULL;
  return self;
  }
- SQUserPointer GetUserData(int idx,SQUserPointer tag=0)
+ SQUserPointer GetUserData(SQInteger idx,SQUserPointer tag=0)
  {
  SQUserPointer otag;
  SQUserPointer up;
@@ -159,7 +159,7 @@
  }
  return NULL;
  }
- BOOL GetBool(int idx)
+ BOOL GetBool(SQInteger idx)
  {
  SQBool ret;
  if(idx > 0 && idx <= _top) {
@@ -168,7 +168,7 @@
  }
  return FALSE;
  }
- int GetType(int idx)
+ int GetType(SQInteger idx)
  {
  if(idx > 0 && idx <= _top) {
  return sq_gettype(v,idx);
Index: src/sdk/scripting/sqplus/SquirrelObject.cpp
===================================================================
--- src/sdk/scripting/sqplus/SquirrelObject.cpp (revision 3480)
+++ src/sdk/scripting/sqplus/SquirrelObject.cpp (working copy)
@@ -71,7 +71,7 @@
  }
 }

-void SquirrelObject::AttachToStackObject(int idx)
+void SquirrelObject::AttachToStackObject(SQInteger idx)
 {
  HSQOBJECT t;
  sq_getstackobj(SquirrelVM::_VM,idx,&t);

--- End code ---

killerbot:
I'll leave this to Yiannis. The squirrel code used to work in the past, would be best if we don't need to change it.

@Yiannis : can you fix it ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version