Fixup typedefs for KrkObj, KrkString

This commit is contained in:
K. Lange 2022-07-26 14:12:55 +09:00
parent 7d568a209a
commit 786457c6fd
4 changed files with 3 additions and 13 deletions

View File

@ -42,7 +42,7 @@ typedef struct {
size_t linesCapacity;
KrkLineMap * lines;
KrkString * filename;
struct KrkString * filename;
KrkValueArray constants;
} KrkChunk;

View File

@ -87,7 +87,6 @@ typedef enum {
KRK_STRING_UCS4 = KRK_OBJ_FLAGS_STRING_UCS4, /**< Codepoints are four bytes. */
} KrkStringType;
#undef KrkString
/**
* @brief Immutable sequence of Unicode codepoints.
* @extends KrkObj

View File

@ -80,7 +80,7 @@ extern void krk_tableAddAll(KrkTable * from, KrkTable * to);
* @param hash Precalculated hash value for the string.
* @return If the string was found, the string object representation, else NULL.
*/
extern KrkString * krk_tableFindString(KrkTable * table, const char * chars, size_t length, uint32_t hash);
extern struct KrkString * krk_tableFindString(KrkTable * table, const char * chars, size_t length, uint32_t hash);
/**
* @brief Assign a value to a key in a table.
@ -125,7 +125,7 @@ extern int krk_tableGet(KrkTable * table, KrkValue key, KrkValue * value);
* @param value Output pointer to place resulting value in.
* @return 0 if the key was not found, 1 if it was.
*/
extern int krk_tableGet_fast(KrkTable * table, KrkString * str, KrkValue * value);
extern int krk_tableGet_fast(KrkTable * table, struct KrkString * str, KrkValue * value);
/**
* @brief Remove a key from a hash table.

View File

@ -7,15 +7,6 @@
#include <string.h>
#include "kuroko.h"
/**
* @brief Base structure of all heap objects.
*
* KrkObj is the base type of all objects stored on the heap and
* managed by the garbage collector.
*/
typedef struct KrkObj KrkObj;
typedef struct KrkString KrkString;
/**
* @brief Tag enum for basic value types.
*