File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ template <> struct process_attribute<is_new_style_constructor> : process_attribu
377377};
378378
379379inline void process_kw_only_arg (const arg &a, function_record *r) {
380- if (!a.name || strlen ( a.name ) == 0 )
380+ if (!a.name || a.name [ 0 ] == ' \0 ' )
381381 pybind11_fail (" arg(): cannot specify an unnamed argument after an kw_only() annotation" );
382382 ++r->nargs_kw_only ;
383383}
Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ class cpp_function : public function {
470470 signatures += it->signature ;
471471 signatures += " \n " ;
472472 }
473- if (it->doc && strlen ( it->doc ) > 0 && options::show_user_defined_docstrings ()) {
473+ if (it->doc && it->doc [ 0 ] != ' \0 ' && options::show_user_defined_docstrings ()) {
474474 // If we're appending another docstring, and aren't printing function signatures, we
475475 // need to append a newline first:
476476 if (!options::show_function_signatures ()) {
You can’t perform that action at this time.
0 commit comments