Browse Source

Update extending.md

Marco Bambini 5 years ago
parent
commit
8210685838
1 changed files with 3 additions and 5 deletions
  1. 3 5
      docs/extending.md

+ 3 - 5
docs/extending.md

@@ -1,13 +1,13 @@
 ## Extending Gravity
 ## Extending Gravity
 
 
-Gravity can be extended at runtime using the C API (please read the Embedding section before proceeding).
+Gravity can be extended at runtime using the C API (please read the [Embedding](https://marcobambini.github.io/gravity/#/embedding) section before proceeding).
 
 
 Three steps are required:
 Three steps are required:
 1. Create a new class
 1. Create a new class
 2. Add methods and properties to the class
 2. Add methods and properties to the class
 3. Register this class inside the VM
 3. Register this class inside the VM
 
 
-In this simple example we'll create a "Foo" class with a "bar" method in C and then we'll execute it from Gravity.
+In this simple example we'll create a "Foo" class with a "sum" method in C and then we'll execute it from Gravity.
 ```c
 ```c
 #include "gravity_compiler.h"
 #include "gravity_compiler.h"
 #include "gravity_macros.h"
 #include "gravity_macros.h"
@@ -82,7 +82,5 @@ int main (void) {
     
     
     return 0;
     return 0;
 }
 }
-
-For more examples see the file gravity_core.c in the src/runtime/ directory. Most of the Gravity classes are built using these same APIs.
-
 ```
 ```
+For more examples see the file gravity_core.c in the src/runtime/ directory. Most of the Gravity classes are built using these same APIs.