Fixed jsext sample: update to JsObject constructor changes.
git-svn-id: http://voip.null.ro/svn/yate@6445 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
046cb195e9
commit
b94b3337c0
|
@ -28,16 +28,16 @@ class JsExtObj : public JsObject
|
||||||
{
|
{
|
||||||
YCLASS(JsExtObj,JsObject)
|
YCLASS(JsExtObj,JsObject)
|
||||||
public:
|
public:
|
||||||
inline JsExtObj(Mutex* mtx)
|
inline JsExtObj(ScriptMutex* mtx)
|
||||||
: JsObject("ExtObj",mtx,true)
|
: JsObject("ExtObj",mtx,true)
|
||||||
{
|
{
|
||||||
Debug(DebugAll,"JsExtObj::JsExtObj(%p) [%p]",mtx,this);
|
Debug(DebugAll,"JsExtObj::JsExtObj(%p) [%p]",mtx,this);
|
||||||
}
|
}
|
||||||
inline JsExtObj(Mutex* mtx, const char* val)
|
inline JsExtObj(ScriptMutex* mtx, unsigned int line, const char* val)
|
||||||
: JsObject("ExtObj",mtx,true),
|
: JsObject(mtx,"[object ExtObj]",line,true),
|
||||||
m_val(val)
|
m_val(val)
|
||||||
{
|
{
|
||||||
Debug(DebugAll,"JsExtObj::JsExtObj(%p,'%s') [%p]",mtx,val,this);
|
Debug(DebugAll,"JsExtObj::JsExtObj(%p,%u,'%s') [%p]",mtx,line,val,this);
|
||||||
params().addParam(new ExpFunction("test"));
|
params().addParam(new ExpFunction("test"));
|
||||||
}
|
}
|
||||||
virtual ~JsExtObj()
|
virtual ~JsExtObj()
|
||||||
|
@ -82,7 +82,7 @@ JsObject* JsExtObj::runConstructor(ObjList& stack, const ExpOperation& oper, Gen
|
||||||
val = static_cast<ExpOperation*>(args[0])->c_str();
|
val = static_cast<ExpOperation*>(args[0])->c_str();
|
||||||
// fall through
|
// fall through
|
||||||
case 0:
|
case 0:
|
||||||
return new JsExtObj(mutex(),val);
|
return new JsExtObj(mutex(),oper.lineNumber(),val);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ void JsExtObj::initialize(ScriptContext* context)
|
||||||
{
|
{
|
||||||
if (!context)
|
if (!context)
|
||||||
return;
|
return;
|
||||||
Mutex* mtx = context->mutex();
|
ScriptMutex* mtx = context->mutex();
|
||||||
Lock mylock(mtx);
|
Lock mylock(mtx);
|
||||||
NamedList& params = context->params();
|
NamedList& params = context->params();
|
||||||
if (!params.getParam(YSTRING("ExtObj")))
|
if (!params.getParam(YSTRING("ExtObj")))
|
||||||
|
|
Loading…
Reference in New Issue