Partially refactor string.find().

This commit is contained in:
Mike Pall
2013-05-07 20:44:58 +02:00
parent 2be1c2658f
commit 43de451d78
3 changed files with 73 additions and 63 deletions

View File

@@ -10,8 +10,13 @@
#include "lj_obj.h"
/* String interning. */
/* String helpers. */
LJ_FUNC int32_t LJ_FASTCALL lj_str_cmp(GCstr *a, GCstr *b);
LJ_FUNC const char *lj_str_find(const char *s, const char *f,
MSize slen, MSize flen);
LJ_FUNC int lj_str_haspattern(GCstr *s);
/* String interning. */
LJ_FUNC void lj_str_resize(lua_State *L, MSize newmask);
LJ_FUNCA GCstr *lj_str_new(lua_State *L, const char *str, size_t len);
LJ_FUNC void LJ_FASTCALL lj_str_free(global_State *g, GCstr *s);