Example #1
0
				//ÊÖ„Ó pop
				void reset()
				{
					if(_n == 0)
					{
						_ctx_ptr = NULL;
						if(_ctx)
						{
							_ctx.reset();
						}
						return;
					}
					if(_ctx_ptr == NULL)
					{
						_ctx_ptr = _ctx;
					}
					if(_n == 1)
					{
						duk_pop(_ctx_ptr);
					}
					else
					{
						duk_pop_n(_ctx_ptr,_n);
					}

					_n = 0;
					_ctx_ptr = NULL;
					if(_ctx)
					{
						_ctx.reset();
					}
				}
Example #2
0
				scoped_pop(duk_context *ctx,int n)
				{
					_ctx_ptr = ctx;
					_ctx.reset();
					_n = n;
				}