diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-18 15:19:40 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-18 15:19:40 +0000 |
commit | bad5df60cd53f774b59edd997ec3ff30fba67cac (patch) | |
tree | fa7866ca8ea7529beb61a5b4a446302a50dd617b /Build/source/libs/luajit/LuaJIT-src/src/lj_str.h | |
parent | 6c4ba6b7612a1bfdf20246a22c71e0640471807b (diff) |
libs/luajit: New convention
git-svn-id: svn://tug.org/texlive/trunk@39765 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/luajit/LuaJIT-src/src/lj_str.h')
-rw-r--r-- | Build/source/libs/luajit/LuaJIT-src/src/lj_str.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Build/source/libs/luajit/LuaJIT-src/src/lj_str.h b/Build/source/libs/luajit/LuaJIT-src/src/lj_str.h new file mode 100644 index 00000000000..d8465de663b --- /dev/null +++ b/Build/source/libs/luajit/LuaJIT-src/src/lj_str.h @@ -0,0 +1,27 @@ +/* +** String handling. +** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h +*/ + +#ifndef _LJ_STR_H +#define _LJ_STR_H + +#include <stdarg.h> + +#include "lj_obj.h" + +/* 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); + +#define lj_str_newz(L, s) (lj_str_new(L, s, strlen(s))) +#define lj_str_newlit(L, s) (lj_str_new(L, "" s, sizeof(s)-1)) + +#endif |