浏览代码

Update extending.md

Marco Bambini 5 年之前
父节点
当前提交
8210685838
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      docs/extending.md

+ 3 - 5
docs/extending.md

@@ -1,13 +1,13 @@
 ## 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:
 1. Create a new class
 2. Add methods and properties to the class
 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
 #include "gravity_compiler.h"
 #include "gravity_macros.h"
@@ -82,7 +82,5 @@ int main (void) {
     
     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.