Navigation Menu

Skip to content

Commit

Permalink
Changed all String to STRING
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@19094 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
petdance committed Jun 18, 2007
1 parent 5bcd309 commit 844f9b4
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion include/parrot/interpreter.h
Expand Up @@ -530,7 +530,7 @@ PARROT_API void Parrot_compreg(Interp *interp, STRING *, Parrot_compiler_func_t
PARROT_API PMC *Parrot_compile_string(Parrot_Interp interp,
STRING *type, char *code, STRING **error);
PARROT_API void *Parrot_compile_file(Parrot_Interp interp,
char *fullname, String **error);
char *fullname, STRING **error);

INTVAL sysinfo_i(Interp *interp, INTVAL info_wanted);
STRING *sysinfo_s(Interp *interp, INTVAL info_wanted);
Expand Down
2 changes: 1 addition & 1 deletion include/parrot/nci.h
Expand Up @@ -15,7 +15,7 @@

#include "parrot/parrot.h"

void *build_call_func(Interp *, PMC *, String *);
void *build_call_func(Interp *, PMC *, STRING *);

#endif /* PARROT_NCI_H_GUARD */

Expand Down
7 changes: 3 additions & 4 deletions include/parrot/string.h
Expand Up @@ -22,23 +22,23 @@ struct parrot_string_t;

#include "parrot/parrot.h"

typedef struct parrot_string_t String;
typedef struct parrot_string_t STRING;

typedef enum Forward_flag {
Buffer_moved_FLAG = 1 << 0
} Forward_flags;

/* String iterator */
typedef struct string_iterator_t {
const String *str;
const STRING *str;
UINTVAL bytepos;
UINTVAL charpos;
UINTVAL (*get_and_advance)(Interp *, struct string_iterator_t *i);
void (*set_and_advance)(Interp *, struct string_iterator_t *i, UINTVAL c);
void (*set_position)(Interp *, struct string_iterator_t *i, UINTVAL pos);
} String_iter;

void string_iter_init(Interp *, const String *str, String_iter *);
void string_iter_init(Interp *, const STRING *str, String_iter *);

/* stringinfo parameters */

Expand All @@ -52,7 +52,6 @@ void string_iter_init(Interp *, const String *str, String_iter *);
#define STRINGINFO_STRLEN 6

/* &end_gen */
typedef struct parrot_string_t STRING;

#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_H_GUARD */
Expand Down
2 changes: 1 addition & 1 deletion src/encodings/fixed_8.c
Expand Up @@ -200,7 +200,7 @@ fixed8_set_position(Interp *interp, String_iter *iter, UINTVAL pos)


static void
iter_init(Interp *interp, const String *src, String_iter *iter)
iter_init(Interp *interp, const STRING *src, String_iter *iter)
{
iter->str = src;
iter->bytepos = iter->charpos = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/encodings/ucs2.c
Expand Up @@ -28,7 +28,7 @@ UCS-2 encoding with the help of the ICU library.
#define UNIMPL internal_exception(UNIMPLEMENTED, "unimpl ucs2")


static void iter_init(Interp *, const String *src, String_iter *iter);
static void iter_init(Interp *, const STRING *src, String_iter *iter);


static STRING *
Expand Down Expand Up @@ -215,7 +215,7 @@ ucs2_set_position(Interp *interp, String_iter *i, UINTVAL n)

#endif
static void
iter_init(Interp *interp, const String *src, String_iter *iter)
iter_init(Interp *interp, const STRING *src, String_iter *iter)
{
iter->str = src;
iter->bytepos = iter->charpos = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/encodings/utf16.c
Expand Up @@ -29,7 +29,7 @@ UTF-16 encoding with the help of the ICU library.
#define UNIMPL internal_exception(UNIMPLEMENTED, "unimpl utf16")


static void iter_init(Interp *, const String *src, String_iter *iter);
static void iter_init(Interp *, const STRING *src, String_iter *iter);

/*
Expand Down Expand Up @@ -322,7 +322,7 @@ utf16_set_position(Interp *interp, String_iter *i, UINTVAL n)

#endif
static void
iter_init(Interp *interp, const String *src, String_iter *iter)
iter_init(Interp *interp, const STRING *src, String_iter *iter)
{
iter->str = src;
iter->bytepos = iter->charpos = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/encodings/utf8.c
Expand Up @@ -45,7 +45,7 @@ const char Parrot_utf8skip[256] = {
typedef unsigned char utf8_t;
#endif

static void iter_init(Interp *, const String *src, String_iter *iter);
static void iter_init(Interp *, const STRING *src, String_iter *iter);

/*
Expand Down Expand Up @@ -499,7 +499,7 @@ bytes(Interp *interp, STRING *src)
}

static void
iter_init(Interp *interp, const String *src, String_iter *iter)
iter_init(Interp *interp, const STRING *src, String_iter *iter)
{
iter->str = src;
iter->bytepos = iter->charpos = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/inter_misc.c
Expand Up @@ -149,7 +149,7 @@ void Parrot_compreg(Parrot_Interp interp, STRING *type,
=item C<PMC *
Parrot_compile_string(Parrot_Interp interp, STRING *type,
char *code, String **error)>
char *code, STRING **error)>
Compile code string.
Expand Down Expand Up @@ -179,7 +179,7 @@ Parrot_compile_string(Parrot_Interp interp, STRING *type,
=item C<void
Parrot_compile_file(Parrot_Interp interp, const char *fullname,
String **error)>
STRING **error)>
Compile code file.
Expand All @@ -189,7 +189,7 @@ Compile code file.

void *
Parrot_compile_file(Parrot_Interp interp, char *fullname,
String **error)
STRING **error)
{
return IMCC_compile_file_s(interp, fullname, error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/jit.h
Expand Up @@ -318,7 +318,7 @@ parrot_build_asm(Interp *interp,
/*
* NCI interface
*/
void *Parrot_jit_build_call_func(Interp *, PMC *, String *);
void *Parrot_jit_build_call_func(Interp *, PMC *, STRING *);

#endif /* PARROT_JIT_H_GUARD */

Expand Down
2 changes: 1 addition & 1 deletion src/jit/i386/jit_emit.h
Expand Up @@ -3705,7 +3705,7 @@ count_regs(char *sig, char *sig_start)
*/
void *
Parrot_jit_build_call_func(Interp *interp, PMC *pmc_nci,
String *signature)
STRING *signature)
{
Parrot_jit_info_t jit_info;
char *sig, *pc;
Expand Down
4 changes: 2 additions & 2 deletions src/stacks.c
Expand Up @@ -248,7 +248,7 @@ stack_push(Interp *interp, Stack_Chunk_t **stack_p /*NN*/,
UVal_pmc(entry->entry) = (PMC *)thing;
break;
case STACK_ENTRY_STRING:
UVal_str(entry->entry) = (String *)thing;
UVal_str(entry->entry) = (STRING *)thing;
break;
case STACK_ENTRY_POINTER:
case STACK_ENTRY_DESTINATION:
Expand Down Expand Up @@ -305,7 +305,7 @@ stack_pop(Interp *interp, Stack_Chunk_t **stack_p /*NN*/,
*(PMC **)where = UVal_pmc(entry->entry);
break;
case STACK_ENTRY_STRING:
*(String **)where = UVal_str(entry->entry);
*(STRING **)where = UVal_str(entry->entry);
break;
case STACK_ENTRY_POINTER:
case STACK_ENTRY_DESTINATION:
Expand Down
4 changes: 2 additions & 2 deletions src/string.c
Expand Up @@ -104,9 +104,9 @@ Copies the string header from the first Parrot string to the second.
*/

static void
copy_string_header(String *dest /*NN*/, const String *src /*NN*/)
copy_string_header(STRING *dest /*NN*/, const STRING *src /*NN*/)
{
memcpy(dest, src, sizeof (String));
memcpy(dest, src, sizeof (STRING));
}

/*
Expand Down

0 comments on commit 844f9b4

Please sign in to comment.