Permalink
Browse files

Putting PARROT_INTERP in all the typedefs instead of Interp *, so tha…

…t splint can get the benefit of checking

git-svn-id: https://svn.parrot.org/parrot/trunk@20085 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
petdance committed Jul 22, 2007
1 parent 2a2fe57 commit c4b44b07ab4173cf5c60e4ae160f4316a90ff69a
View
@@ -379,8 +379,8 @@ typedef enum _imcc_reg_allocator_t {
IMCC_GRAPH_ALLOCATOR
} imcc_reg_allocator;
-PARROT_API void IMCC_push_parser_state(Interp*);
-PARROT_API void IMCC_pop_parser_state(Interp*, void *yyscanner);
+PARROT_API void IMCC_push_parser_state(PARROT_INTERP);
+PARROT_API void IMCC_pop_parser_state(PARROT_INTERP, void *yyscanner);
typedef struct _imc_info_t {
struct _imc_info_t *prev;
@@ -87,11 +87,11 @@ Instruction * _mk_instruction(const char *,const char *, int n, SymReg **, int);
/* Globals */
typedef struct _emittert {
- int (*open)(Interp *, void *param);
- int (*emit)(Interp *, void *param, struct _IMC_Unit *, const Instruction *ins);
- int (*new_sub)(Interp *, void *param, struct _IMC_Unit *);
- int (*end_sub)(Interp *, void *param, struct _IMC_Unit *);
- int (*close)(Interp *, void *param);
+ int (*open)(PARROT_INTERP, void *param);
+ int (*emit)(PARROT_INTERP, void *param, struct _IMC_Unit *, const Instruction *ins);
+ int (*new_sub)(PARROT_INTERP, void *param, struct _IMC_Unit *);
+ int (*end_sub)(PARROT_INTERP, void *param, struct _IMC_Unit *);
+ int (*close)(PARROT_INTERP, void *param);
} Emitter;
enum Emitter_type { EMIT_FILE, EMIT_PBC };
View
@@ -32,10 +32,10 @@ EXTERN int is_def;
typedef void* yyscan_t;
#endif
-SymReg * macro(Interp *, char *name);
+SymReg * macro(PARROT_INTERP, char *name);
-PARROT_API int yyparse(yyscan_t, Interp*);
-PARROT_API int yylex(YYSTYPE *, yyscan_t, Interp*);
+PARROT_API int yyparse(yyscan_t, PARROT_INTERP);
+PARROT_API int yylex(YYSTYPE *, yyscan_t, PARROT_INTERP);
PARROT_API int yylex_destroy(yyscan_t);
int yylex_init(yyscan_t*);
View
@@ -33,49 +33,49 @@ PARROT_API extern CHARSET *Parrot_ascii_charset_ptr;
#define PARROT_BINARY_CHARSET Parrot_binary_charset_ptr
#define PARROT_UNICODE_CHARSET Parrot_unicode_charset_ptr
-typedef STRING *(*charset_get_graphemes_t)(Interp *, STRING *source_string, UINTVAL offset, UINTVAL count);
-typedef STRING *(*charset_get_graphemes_inplace_t)(Interp *, STRING *source_string, UINTVAL offset, UINTVAL count, STRING *dest_string);
-typedef void (*charset_set_graphemes_t)(Interp *, STRING *source_string, UINTVAL offset, UINTVAL replace_count, STRING *insert_string);
+typedef STRING *(*charset_get_graphemes_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset, UINTVAL count);
+typedef STRING *(*charset_get_graphemes_inplace_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset, UINTVAL count, STRING *dest_string);
+typedef void (*charset_set_graphemes_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset, UINTVAL replace_count, STRING *insert_string);
-typedef STRING * (*charset_to_charset_t)(Interp *, STRING *source_string,
+typedef STRING * (*charset_to_charset_t)(PARROT_INTERP, STRING *source_string,
STRING *dest);
-typedef STRING * (*charset_from_unicode_t)(Interp *, STRING *source_string,
+typedef STRING * (*charset_from_unicode_t)(PARROT_INTERP, STRING *source_string,
STRING *dest);
-typedef STRING* (*charset_compose_t)(Interp *, STRING *source_string);
-typedef STRING* (*charset_decompose_t)(Interp *, STRING *source_string);
-typedef void (*charset_upcase_t)(Interp *, STRING *source_string);
-typedef void (*charset_downcase_t)(Interp *, STRING *source_string);
-typedef void (*charset_titlecase_t)(Interp *, STRING *source_string);
-typedef void (*charset_upcase_first_t)(Interp *, STRING *source_string);
-typedef void (*charset_downcase_first_t)(Interp *, STRING *source_string);
-typedef void (*charset_titlecase_first_t)(Interp *, STRING *source_string);
-typedef INTVAL (*charset_compare_t)(Interp *, const STRING *lhs, const STRING *rhs);
-typedef INTVAL (*charset_index_t)(Interp *, STRING *source_string, STRING *search_string, UINTVAL offset);
-typedef INTVAL (*charset_rindex_t)(Interp *, STRING *source_string, STRING *search_string, UINTVAL offset);
-typedef UINTVAL (*charset_validate_t)(Interp *, STRING *source_string);
-typedef INTVAL (*charset_is_cclass_t)(Interp *, INTVAL, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_cclass_t)(Interp *, INTVAL, STRING *source_string, UINTVAL offset, UINTVAL count);
-typedef INTVAL (*charset_find_not_cclass_t)(Interp *, INTVAL, STRING *source_string, UINTVAL offset, UINTVAL count);
-typedef INTVAL (*charset_is_wordchar_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_wordchar_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_not_wordchar_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_is_whitespace_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_whitespace_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_not_whitespace_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_is_digit_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_digit_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_not_digit_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_is_punctuation_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_punctuation_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_not_punctuation_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_is_newline_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_newline_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_not_newline_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_word_boundary_t)(Interp *, STRING *source_string, UINTVAL offset);
-typedef STRING *(*charset_string_from_codepoint_t)(Interp *, UINTVAL codepoint);
-typedef size_t (*charset_compute_hash_t)(Interp *, const STRING *, size_t seed);
-
-typedef STRING* (*charset_converter_t)(Interp *, STRING *src, STRING *dst);
+typedef STRING* (*charset_compose_t)(PARROT_INTERP, STRING *source_string);
+typedef STRING* (*charset_decompose_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_upcase_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_downcase_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_titlecase_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_upcase_first_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_downcase_first_t)(PARROT_INTERP, STRING *source_string);
+typedef void (*charset_titlecase_first_t)(PARROT_INTERP, STRING *source_string);
+typedef INTVAL (*charset_compare_t)(PARROT_INTERP, const STRING *lhs, const STRING *rhs);
+typedef INTVAL (*charset_index_t)(PARROT_INTERP, STRING *source_string, STRING *search_string, UINTVAL offset);
+typedef INTVAL (*charset_rindex_t)(PARROT_INTERP, STRING *source_string, STRING *search_string, UINTVAL offset);
+typedef UINTVAL (*charset_validate_t)(PARROT_INTERP, STRING *source_string);
+typedef INTVAL (*charset_is_cclass_t)(PARROT_INTERP, INTVAL, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_cclass_t)(PARROT_INTERP, INTVAL, STRING *source_string, UINTVAL offset, UINTVAL count);
+typedef INTVAL (*charset_find_not_cclass_t)(PARROT_INTERP, INTVAL, STRING *source_string, UINTVAL offset, UINTVAL count);
+typedef INTVAL (*charset_is_wordchar_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_wordchar_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_not_wordchar_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_is_whitespace_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_whitespace_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_not_whitespace_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_is_digit_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_digit_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_not_digit_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_is_punctuation_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_punctuation_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_not_punctuation_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_is_newline_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_newline_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_not_newline_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef INTVAL (*charset_find_word_boundary_t)(PARROT_INTERP, STRING *source_string, UINTVAL offset);
+typedef STRING *(*charset_string_from_codepoint_t)(PARROT_INTERP, UINTVAL codepoint);
+typedef size_t (*charset_compute_hash_t)(PARROT_INTERP, const STRING *, size_t seed);
+
+typedef STRING* (*charset_converter_t)(PARROT_INTERP, STRING *src, STRING *dst);
/* HEADERIZER BEGIN: src/charset.c */
View
@@ -23,8 +23,8 @@ PMC * Parrot_clone_lib_into(
PARROT_API
PMC * Parrot_init_lib( PARROT_INTERP,
- PMC *(*load_func)(NULLOK(Interp *)),
- void (*init_func)(Interp *,
+ PMC *(*load_func)(PARROT_INTERP),
+ void (*init_func)(PARROT_INTERP,
NULLOK(PMC *)) )
__attribute__nonnull__(1);
View
@@ -15,20 +15,20 @@
#include "parrot/parrot.h"
-typedef STRING * (*encoding_to_encoding_t)(Interp*, STRING *src, STRING *dest);
-typedef UINTVAL (*encoding_get_codepoint_t)(Interp*, const STRING *src, UINTVAL offset);
-typedef void (*encoding_set_codepoint_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL codepoint);
-typedef UINTVAL (*encoding_get_byte_t)(Interp*, const STRING *src, UINTVAL offset);
-typedef void (*encoding_set_byte_t)(Interp*, const STRING *src, UINTVAL offset, UINTVAL count);
-typedef STRING *(*encoding_get_codepoints_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count);
-typedef STRING *(*encoding_get_bytes_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count);
-typedef STRING *(*encoding_get_codepoints_inplace_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count, STRING *dest_string);
-typedef STRING *(*encoding_get_bytes_inplace_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count, STRING *dest_string);
-typedef void (*encoding_set_codepoints_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count, STRING *new_bytes);
-typedef void (*encoding_set_bytes_t)(Interp*, STRING *src, UINTVAL offset, UINTVAL count, STRING *new_bytes);
-typedef void (*encoding_become_encoding_t)(Interp*, STRING *src);
-typedef UINTVAL (*encoding_codepoints_t)(Interp*, STRING *src);
-typedef UINTVAL (*encoding_bytes_t)(Interp*, STRING *src);
+typedef STRING * (*encoding_to_encoding_t)(PARROT_INTERP, STRING *src, STRING *dest);
+typedef UINTVAL (*encoding_get_codepoint_t)(PARROT_INTERP, const STRING *src, UINTVAL offset);
+typedef void (*encoding_set_codepoint_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL codepoint);
+typedef UINTVAL (*encoding_get_byte_t)(PARROT_INTERP, const STRING *src, UINTVAL offset);
+typedef void (*encoding_set_byte_t)(PARROT_INTERP, const STRING *src, UINTVAL offset, UINTVAL count);
+typedef STRING *(*encoding_get_codepoints_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count);
+typedef STRING *(*encoding_get_bytes_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count);
+typedef STRING *(*encoding_get_codepoints_inplace_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count, STRING *dest_string);
+typedef STRING *(*encoding_get_bytes_inplace_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count, STRING *dest_string);
+typedef void (*encoding_set_codepoints_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count, STRING *new_bytes);
+typedef void (*encoding_set_bytes_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count, STRING *new_bytes);
+typedef void (*encoding_become_encoding_t)(PARROT_INTERP, STRING *src);
+typedef UINTVAL (*encoding_codepoints_t)(PARROT_INTERP, STRING *src);
+typedef UINTVAL (*encoding_bytes_t)(PARROT_INTERP, STRING *src);
/* iterator support */
@@ -38,7 +38,7 @@ typedef void (*encoding_iter_init_t)(PARROT_INTERP, const STRING *src,
struct string_iterator_t *);
struct _encoding {
- const char *name;
+ NOTNULL(const char *name);
UINTVAL max_bytes_per_codepoint;
encoding_to_encoding_t to_encoding;
encoding_get_codepoint_t get_codepoint;
@@ -71,7 +71,7 @@ PARROT_API extern ENCODING *Parrot_default_encoding_ptr;
#define PARROT_FIXED_8_ENCODING Parrot_fixed_8_encoding_ptr
#define PARROT_DEFAULT_FOR_UNICODE_ENCODING NULL
-typedef INTVAL (*encoding_converter_t)(Interp *, ENCODING *lhs, ENCODING *rhs);
+typedef INTVAL (*encoding_converter_t)(PARROT_INTERP, ENCODING *lhs, ENCODING *rhs);
/* HEADERIZER BEGIN: src/encoding.c */
View
@@ -16,7 +16,7 @@
#include "parrot/compiler.h" /* compiler capabilities */
-typedef void (*exit_handler_f)(Interp *, int , void *);
+typedef void (*exit_handler_f)(PARROT_INTERP, int , void *);
typedef struct _handler_node_t {
exit_handler_f function;
Oops, something went wrong.

0 comments on commit c4b44b0

Please sign in to comment.