Util: Move StringList to string.c

This commit is contained in:
Vicki Pfau 2017-04-11 21:41:53 -07:00
parent 7dc9eb4d56
commit bf716b947a
4 changed files with 6 additions and 2 deletions

View File

@ -92,6 +92,8 @@ CXX_GUARD_START
dest->size = src->size; \
} \
DECLARE_VECTOR(StringList, char*);
CXX_GUARD_END
#endif

View File

@ -48,7 +48,6 @@ struct mCheat {
mLOG_DECLARE_CATEGORY(CHEATS);
DECLARE_VECTOR(mCheatList, struct mCheat);
DECLARE_VECTOR(StringList, char*);
struct mCheatDevice;
struct mCheatSet {

View File

@ -17,7 +17,6 @@ mLOG_DEFINE_CATEGORY(CHEATS, "Cheats", "core.cheats");
DEFINE_VECTOR(mCheatList, struct mCheat);
DEFINE_VECTOR(mCheatSets, struct mCheatSet*);
DEFINE_VECTOR(StringList, char*);
static int32_t _readMem(struct mCore* core, uint32_t address, int width) {
switch (width) {

View File

@ -5,8 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba-util/string.h>
#include <mgba-util/vector.h>
#include <string.h>
DEFINE_VECTOR(StringList, char*);
#ifndef HAVE_STRNDUP
char* strndup(const char* start, size_t len) {
// This is suboptimal, but anything recent should have strndup