You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doesn't return functions and structures that match the condition with a [RubyHeaderParser::Parser](lib/ruby_header_parser/parser.rb)
69
+
70
+
e.g.
71
+
72
+
```yaml
73
+
function:
74
+
exclude_name:
75
+
- !ruby/regexp /^rb_check_safe_str$/i
76
+
- rb_scan_args_bad_format
77
+
```
78
+
79
+
`exclude_name`is preferred over `include_name`
80
+
81
+
Other specifications are the same as `include_name`
82
+
83
+
## `function.pointer_hint`
84
+
Provide a hint if the function argument type is a pointer
85
+
86
+
e.g.
87
+
88
+
```yaml
89
+
function:
90
+
pointer_hint:
91
+
RSTRING_PTR: # function name (Exact match)
92
+
self: raw
93
+
rb_data_object_make:
94
+
4: sref
95
+
```
96
+
97
+
### Function arguments (`1`, `2`, `3`, ...)
98
+
* `ref` (default)
99
+
* normal pointer
100
+
* e.g. 1st argument of `VALUE rb_const_list(void*)`
101
+
* `in_ref`
102
+
* input only pointer
103
+
* e.g. 2nd argument of `void rb_define_variable(const char *name, VALUE *var)`
104
+
* `sref`
105
+
* special one for multiple pointer
106
+
* e.g. 3rd argument of `rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)`
107
+
* `array`
108
+
* array
109
+
* e.g. 4th argument of `VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)`
110
+
* `ref_array`
111
+
* array of pointer
112
+
* e.g. 10th argument of `rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, bool f_var, bool f_hash, bool f_block, VALUE *vars[], RB_UNUSED_VAR(const char *fmt), RB_UNUSED_VAR(int varc))`
113
+
* `str_array`
114
+
* array of string
115
+
* e.g. 2nd argument of `int rb_find_file_ext(VALUE *feature, const char *const *exts)`
116
+
* `function`
117
+
* function pointer
118
+
* e.g. 4th argument of `void rb_define_method(VALUE klass, const char *mid, VALUE (*func)(), int arity)`
119
+
120
+
### Function return value (`self`)
121
+
* `ref` (default)
122
+
* normal pointer
123
+
* e.g. Return value of `int *rb_errno_ptr(void)`
124
+
* `raw`
125
+
* In many cases `char*` can be interpreted as a string. But if `raw` is specified, it suppresses interpretation as a string
126
+
* e.g. Return value of `char* RSTRING_PTR(VALUE str)`
See [CONFIG.md](CONFIG.md) for config file details
54
+
53
55
## Development
54
56
55
57
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
0 commit comments