This repository was archived by the owner on Nov 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtap.cppy
More file actions
46 lines (36 loc) · 1.39 KB
/
Copy pathtap.cppy
File metadata and controls
46 lines (36 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright (c) 2011, 2012 Timo Savola
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*/
#include "tap.hpp"
#include "tap/fork.hpp"
#include "tap/urlopen.hpp"
#include <concrete/context.hpp>
#include <concrete/execution.hpp>
#include <concrete/objects/dict.hpp>
#include <concrete/objects/function.hpp>
#include <concrete/objects/internal.hpp>
#include <concrete/objects/module.hpp>
#include <concrete/objects/string.hpp>
namespace concrete {
void TapModuleInit(const DictObject &modules)
{
auto dict = DictObject::New();
dict.set_item(StringObject::New("execute"), InternalObject::New(internal::TapModule_Execute));
dict.set_item(StringObject::New("fork"), InternalObject::New(internal::TapModule_Fork));
dict.set_item(StringObject::New("urlopen"), InternalObject::New(internal::TapModule_URLOpen));
modules.set_item(StringObject::New("tap"), ModuleObject::New(dict));
}
{{{ ImplementPointer("AbstractURLOpen") }}}
{{{ ImplementInternalFunction("TapModule_Execute") }}}
{
Context::Active().add_execution(Execution::NewCall(args));
return Object();
}
{{{ ImplementInternalContinuation("TapModule_Fork") }}}
{{{ ImplementInternalContinuation("TapModule_URLOpen") }}}
} // namespace