Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 89533 | Differences between
and this patch

Collapse All | Expand All

(-)src/sdk/scripting/sqplus/SquirrelObject.h (-10 / +10 lines)
Lines 11-17 Link Here
11
	SquirrelObject(HSQOBJECT o);
11
	SquirrelObject(HSQOBJECT o);
12
	SquirrelObject & operator =(const SquirrelObject &o);
12
	SquirrelObject & operator =(const SquirrelObject &o);
13
	SquirrelObject & operator =(int n);
13
	SquirrelObject & operator =(int n);
14
	void AttachToStackObject(int idx);
14
	void AttachToStackObject(SQInteger idx);
15
  void Reset(void); // Release (any) reference and reset _o.
15
  void Reset(void); // Release (any) reference and reset _o.
16
  SquirrelObject Clone();
16
  SquirrelObject Clone();
17
	BOOL SetValue(const SquirrelObject &key,const SquirrelObject &val);
17
	BOOL SetValue(const SquirrelObject &key,const SquirrelObject &val);
Lines 102-122 Link Here
102
		_top = sq_gettop(v);
102
		_top = sq_gettop(v);
103
		this->v = v;
103
		this->v = v;
104
	}
104
	}
105
	SQFloat GetFloat(int idx) {
105
	SQFloat GetFloat(SQInteger idx) {
106
		SQFloat x = 0.0f;
106
		SQFloat x = 0.0f;
107
		if(idx > 0 && idx <= _top) {
107
		if(idx > 0 && idx <= _top) {
108
			sq_getfloat(v,idx,&x);
108
			sq_getfloat(v,idx,&x);
109
		}
109
		}
110
		return x;
110
		return x;
111
	}
111
	}
112
	SQInteger GetInt(int idx) {
112
	SQInteger GetInt(SQInteger idx) {
113
		SQInteger x = 0;
113
		SQInteger x = 0;
114
		if(idx > 0 && idx <= _top) {
114
		if(idx > 0 && idx <= _top) {
115
			sq_getinteger(v,idx,&x);
115
			sq_getinteger(v,idx,&x);
116
		}
116
		}
117
		return x;
117
		return x;
118
	}
118
	}
119
	HSQOBJECT GetObjectHandle(int idx) {
119
	HSQOBJECT GetObjectHandle(SQInteger idx) {
120
		HSQOBJECT x;
120
		HSQOBJECT x;
121
		if(idx > 0 && idx <= _top) {
121
		if(idx > 0 && idx <= _top) {
122
			sq_resetobject(&x);
122
			sq_resetobject(&x);
Lines 124-130 Link Here
124
		}
124
		}
125
		return x;
125
		return x;
126
	}
126
	}
127
	const SQChar *GetString(int idx)
127
	const SQChar *GetString(SQInteger idx)
128
	{
128
	{
129
    const SQChar *x = NULL;
129
    const SQChar *x = NULL;
130
		if(idx > 0 && idx <= _top) {
130
		if(idx > 0 && idx <= _top) {
Lines 132-138 Link Here
132
		}
132
		}
133
		return x;
133
		return x;
134
	}
134
	}
135
	SQUserPointer GetUserPointer(int idx)
135
	SQUserPointer GetUserPointer(SQInteger idx)
136
	{
136
	{
137
		SQUserPointer x = 0;
137
		SQUserPointer x = 0;
138
		if(idx > 0 && idx <= _top) {
138
		if(idx > 0 && idx <= _top) {
Lines 140-153 Link Here
140
		}
140
		}
141
		return x;
141
		return x;
142
	}
142
	}
143
	SQUserPointer GetInstanceUp(int idx,SQUserPointer tag)
143
	SQUserPointer GetInstanceUp(SQInteger idx,SQUserPointer tag)
144
	{
144
	{
145
		SQUserPointer self;
145
		SQUserPointer self;
146
		if(SQ_FAILED(sq_getinstanceup(v,idx,(SQUserPointer*)&self,tag)))
146
		if(SQ_FAILED(sq_getinstanceup(v,idx,(SQUserPointer*)&self,tag)))
147
			return NULL;
147
			return NULL;
148
		return self;
148
		return self;
149
	}
149
	}
150
	SQUserPointer GetUserData(int idx,SQUserPointer tag=0)
150
	SQUserPointer GetUserData(SQInteger idx,SQUserPointer tag=0)
151
	{
151
	{
152
		SQUserPointer otag;
152
		SQUserPointer otag;
153
		SQUserPointer up;
153
		SQUserPointer up;
Lines 159-165 Link Here
159
		}
159
		}
160
		return NULL;
160
		return NULL;
161
	}
161
	}
162
	BOOL GetBool(int idx)
162
	BOOL GetBool(SQInteger idx)
163
	{
163
	{
164
		SQBool ret;
164
		SQBool ret;
165
		if(idx > 0 && idx <= _top) {
165
		if(idx > 0 && idx <= _top) {
Lines 168-174 Link Here
168
		}
168
		}
169
		return FALSE;
169
		return FALSE;
170
	}
170
	}
171
	int GetType(int idx)
171
	int GetType(SQInteger idx)
172
	{
172
	{
173
		if(idx > 0 && idx <= _top) {
173
		if(idx > 0 && idx <= _top) {
174
			return sq_gettype(v,idx);
174
			return sq_gettype(v,idx);
(-)src/sdk/scripting/sqplus/SquirrelObject.cpp (-1 / +1 lines)
Lines 71-77 Link Here
71
	}
71
	}
72
}
72
}
73
73
74
void SquirrelObject::AttachToStackObject(int idx)
74
void SquirrelObject::AttachToStackObject(SQInteger idx)
75
{
75
{
76
	HSQOBJECT t;
76
	HSQOBJECT t;
77
	sq_getstackobj(SquirrelVM::_VM,idx,&t);
77
	sq_getstackobj(SquirrelVM::_VM,idx,&t);
(-)src/sdk/scripting/bindings/sc_dialog.cpp (-2 / +2 lines)
Lines 98-104 Link Here
98
        if (!s_ActiveDialog)
98
        if (!s_ActiveDialog)
99
        {
99
        {
100
            cbMessageBox(_("XRCID() only valid while inside a ShowDialog() call..."), _("Error"), wxICON_ERROR);
100
            cbMessageBox(_("XRCID() only valid while inside a ShowDialog() call..."), _("Error"), wxICON_ERROR);
101
            return sa.Return(-1);
101
            return sa.Return((SQInteger)-1);
102
        }
102
        }
103
        
103
        
104
        wxWindow* win = 0;
104
        wxWindow* win = 0;
Lines 106-112 Link Here
106
            win = wxWindow::FindWindowByName(cbC2U(sa.GetString(2)), s_ActiveDialog);
106
            win = wxWindow::FindWindowByName(cbC2U(sa.GetString(2)), s_ActiveDialog);
107
        else
107
        else
108
            win = wxWindow::FindWindowByName(*SqPlus::GetInstance<wxString>(v, 2), s_ActiveDialog);
108
            win = wxWindow::FindWindowByName(*SqPlus::GetInstance<wxString>(v, 2), s_ActiveDialog);
109
        return sa.Return(win ? win->GetId() : -1);
109
        return sa.Return(win ? (SQInteger)win->GetId() : (SQInteger)-1);
110
    }
110
    }
111
111
112
    void Register_Dialog()
112
    void Register_Dialog()

Return to bug 89533