Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
blueloveTH committed May 1, 2024
1 parent 1ba8da1 commit 6a9f45a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/02 Casting Types/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ int main(){

PyObject* str_obj = VAR("hello world");
// Cast PyObject* to Str type
Str& str = CAST(Str&, str_obj);
std::cout << "string: " << str.c_str() << std::endl; // hello world
Str& str_var = CAST(Str&, str_obj);
std::cout << "string: " << str_var << std::endl; // hello world

PyObject* int_obj = VAR(10);
// Cast PyObject* to Int type
Expand Down

0 comments on commit 6a9f45a

Please sign in to comment.