:returns: true if the pattern reference is used to handle maps instead
of acl, false otherwise.
+.. js:function:: Patref.purge(ref)
+
+ Completely prune all pattern reference entries pointed to by Patref object.
+ This special operation doesn't require committing.
+
.. js:function:: Patref.prepare(ref)
Create a new empty version for Patref Object. It can be used to manipulate
return 0;
}
+int hlua_patref_purge(lua_State *L)
+{
+ struct hlua_patref *ref;
+
+ ref = hlua_checkudata(L, 1, class_patref_ref);
+ BUG_ON(!ref);
+
+ lua_pushinteger(L, 0); // from
+ lua_pushinteger(L, ~0); // to
+ return _hlua_patref_clear(L, LUA_OK, 0);
+}
+
void hlua_fcn_new_patref(lua_State *L, struct pat_ref *ref)
{
struct hlua_patref *_ref;
hlua_class_function(L, "is_map", hlua_patref_is_map);
hlua_class_function(L, "prepare", hlua_patref_prepare);
hlua_class_function(L, "commit", hlua_patref_commit);
+ hlua_class_function(L, "purge", hlua_patref_purge);
}
int hlua_patref_gc(lua_State *L)