Commit 1550858
committed
addon: Pass module object to NODE_MODULE init function
mainly to allow native addons to export single functions on
rather than being restricted to operating on an existing
object.
Init functions now receive exports as the first argument, like
before, but also the module object as the second argument, if they
support it.
Related to #4634
cc: @rvagg1 parent 00b4b7b commit 1550858
File tree
6 files changed
+52
-13
lines changed- lib
- src
- test/addons/hello-world-function-export
6 files changed
+52
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
493 | | - | |
| 491 | + | |
494 | 492 | | |
495 | 493 | | |
496 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
1786 | 1788 | | |
1787 | 1789 | | |
1788 | 1790 | | |
1789 | | - | |
1790 | | - | |
| 1791 | + | |
| 1792 | + | |
1791 | 1793 | | |
1792 | 1794 | | |
1793 | 1795 | | |
| |||
1800 | 1802 | | |
1801 | 1803 | | |
1802 | 1804 | | |
1803 | | - | |
1804 | | - | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1805 | 1812 | | |
1806 | 1813 | | |
1807 | 1814 | | |
| |||
1812 | 1819 | | |
1813 | 1820 | | |
1814 | 1821 | | |
1815 | | - | |
| 1822 | + | |
1816 | 1823 | | |
1817 | 1824 | | |
1818 | 1825 | | |
| |||
1869 | 1876 | | |
1870 | 1877 | | |
1871 | 1878 | | |
1872 | | - | |
| 1879 | + | |
1873 | 1880 | | |
1874 | 1881 | | |
1875 | 1882 | | |
| |||
1953 | 1960 | | |
1954 | 1961 | | |
1955 | 1962 | | |
1956 | | - | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
1957 | 1966 | | |
1958 | 1967 | | |
1959 | 1968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
205 | | - | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
217 | | - | |
| 222 | + | |
218 | 223 | | |
219 | 224 | | |
220 | 225 | | |
| |||
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
235 | | - | |
| 240 | + | |
236 | 241 | | |
237 | 242 | | |
238 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments