aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/generated_classes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/generated_classes.zig')
-rw-r--r--src/bun.js/bindings/generated_classes.zig996
1 files changed, 414 insertions, 582 deletions
diff --git a/src/bun.js/bindings/generated_classes.zig b/src/bun.js/bindings/generated_classes.zig
index 4fff6c065..92f3812f0 100644
--- a/src/bun.js/bindings/generated_classes.zig
+++ b/src/bun.js/bindings/generated_classes.zig
@@ -1,20 +1,17 @@
-
const JSC = @import("javascript_core");
const Classes = @import("./generated_classes_list.zig").Classes;
const Environment = @import("../../env.zig");
const std = @import("std");
-pub const StaticGetterType = fn(*JSC.JSGlobalObject, JSC.JSValue, JSC.JSValue) callconv(.C) JSC.JSValue;
-pub const StaticSetterType = fn(*JSC.JSGlobalObject, JSC.JSValue, JSC.JSValue, JSC.JSValue) callconv(.C) bool;
-pub const StaticCallbackType = fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
-
-
+pub const StaticGetterType = fn (*JSC.JSGlobalObject, JSC.JSValue, JSC.JSValue) callconv(.C) JSC.JSValue;
+pub const StaticSetterType = fn (*JSC.JSGlobalObject, JSC.JSValue, JSC.JSValue, JSC.JSValue) callconv(.C) bool;
+pub const StaticCallbackType = fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
pub const JSSHA1 = struct {
const SHA1 = Classes.SHA1;
- const GetterType = fn(*SHA1, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA1, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA1, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA1, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA1, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA1, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -44,8 +41,8 @@ pub const JSSHA1 = struct {
/// Modify the internal ptr to point to a new instance of SHA1.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA1) bool {
- JSC.markBinding();
- return SHA1__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA1__dangerouslySetPtr(value, ptr);
}
extern fn SHA1__fromJS(JSC.JSValue) ?*SHA1;
@@ -56,53 +53,42 @@ pub const JSSHA1 = struct {
extern fn SHA1__dangerouslySetPtr(JSC.JSValue, ?*SHA1) bool;
comptime {
-
- if (@TypeOf(SHA1.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA1)) {
- @compileLog("SHA1.constructor is not a constructor");
+ if (@TypeOf(SHA1.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA1)) {
+ @compileLog("SHA1.constructor is not a constructor");
}
-
- if (@TypeOf(SHA1.finalize) != (fn(*SHA1) callconv(.C) void)) {
- @compileLog("SHA1.finalize is not a finalizer");
+
+ if (@TypeOf(SHA1.finalize) != (fn (*SHA1) callconv(.C) void)) {
+ @compileLog("SHA1.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA1.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA1.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA1.digest) != CallbackType)
- @compileLog(
- "Expected SHA1.digest to be a callback"
- );
- if (@TypeOf(SHA1.update) != CallbackType)
- @compileLog(
- "Expected SHA1.update to be a callback"
- );
- if (@TypeOf(SHA1.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA1.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA1.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA1.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA1.getByteLength) != GetterType)
+ @compileLog("Expected SHA1.getByteLength to be a getter");
+
+ if (@TypeOf(SHA1.digest) != CallbackType)
+ @compileLog("Expected SHA1.digest to be a callback");
+ if (@TypeOf(SHA1.update) != CallbackType)
+ @compileLog("Expected SHA1.update to be a callback");
+ if (@TypeOf(SHA1.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA1.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA1.hash) != StaticCallbackType)
+ @compileLog("Expected SHA1.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA1.constructor, .{.name = "SHA1Class__construct"});
- @export(SHA1.digest, .{.name = "SHA1Prototype__digest"});
- @export(SHA1.finalize, .{.name = "SHA1Class__finalize"});
- @export(SHA1.getByteLength, .{.name = "SHA1Prototype__getByteLength"});
- @export(SHA1.getByteLengthStatic, .{.name = "SHA1Class__getByteLengthStatic"});
- @export(SHA1.hash, .{.name = "SHA1Class__hash"});
- @export(SHA1.update, .{.name = "SHA1Prototype__update"});
+ @export(SHA1.constructor, .{ .name = "SHA1Class__construct" });
+ @export(SHA1.digest, .{ .name = "SHA1Prototype__digest" });
+ @export(SHA1.finalize, .{ .name = "SHA1Class__finalize" });
+ @export(SHA1.getByteLength, .{ .name = "SHA1Prototype__getByteLength" });
+ @export(SHA1.getByteLengthStatic, .{ .name = "SHA1Class__getByteLengthStatic" });
+ @export(SHA1.hash, .{ .name = "SHA1Class__hash" });
+ @export(SHA1.update, .{ .name = "SHA1Prototype__update" });
}
}
};
pub const JSMD5 = struct {
const MD5 = Classes.MD5;
- const GetterType = fn(*MD5, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*MD5, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*MD5, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*MD5, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*MD5, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*MD5, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -132,8 +118,8 @@ pub const JSMD5 = struct {
/// Modify the internal ptr to point to a new instance of MD5.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*MD5) bool {
- JSC.markBinding();
- return MD5__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return MD5__dangerouslySetPtr(value, ptr);
}
extern fn MD5__fromJS(JSC.JSValue) ?*MD5;
@@ -144,53 +130,42 @@ pub const JSMD5 = struct {
extern fn MD5__dangerouslySetPtr(JSC.JSValue, ?*MD5) bool;
comptime {
-
- if (@TypeOf(MD5.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD5)) {
- @compileLog("MD5.constructor is not a constructor");
+ if (@TypeOf(MD5.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD5)) {
+ @compileLog("MD5.constructor is not a constructor");
}
-
- if (@TypeOf(MD5.finalize) != (fn(*MD5) callconv(.C) void)) {
- @compileLog("MD5.finalize is not a finalizer");
+
+ if (@TypeOf(MD5.finalize) != (fn (*MD5) callconv(.C) void)) {
+ @compileLog("MD5.finalize is not a finalizer");
}
-
- if (@TypeOf(MD5.getByteLength) != GetterType)
- @compileLog(
- "Expected MD5.getByteLength to be a getter"
- );
-
- if (@TypeOf(MD5.digest) != CallbackType)
- @compileLog(
- "Expected MD5.digest to be a callback"
- );
- if (@TypeOf(MD5.update) != CallbackType)
- @compileLog(
- "Expected MD5.update to be a callback"
- );
- if (@TypeOf(MD5.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected MD5.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(MD5.hash) != StaticCallbackType)
- @compileLog(
- "Expected MD5.hash to be a static callback"
- );
+
+ if (@TypeOf(MD5.getByteLength) != GetterType)
+ @compileLog("Expected MD5.getByteLength to be a getter");
+
+ if (@TypeOf(MD5.digest) != CallbackType)
+ @compileLog("Expected MD5.digest to be a callback");
+ if (@TypeOf(MD5.update) != CallbackType)
+ @compileLog("Expected MD5.update to be a callback");
+ if (@TypeOf(MD5.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected MD5.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(MD5.hash) != StaticCallbackType)
+ @compileLog("Expected MD5.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(MD5.constructor, .{.name = "MD5Class__construct"});
- @export(MD5.digest, .{.name = "MD5Prototype__digest"});
- @export(MD5.finalize, .{.name = "MD5Class__finalize"});
- @export(MD5.getByteLength, .{.name = "MD5Prototype__getByteLength"});
- @export(MD5.getByteLengthStatic, .{.name = "MD5Class__getByteLengthStatic"});
- @export(MD5.hash, .{.name = "MD5Class__hash"});
- @export(MD5.update, .{.name = "MD5Prototype__update"});
+ @export(MD5.constructor, .{ .name = "MD5Class__construct" });
+ @export(MD5.digest, .{ .name = "MD5Prototype__digest" });
+ @export(MD5.finalize, .{ .name = "MD5Class__finalize" });
+ @export(MD5.getByteLength, .{ .name = "MD5Prototype__getByteLength" });
+ @export(MD5.getByteLengthStatic, .{ .name = "MD5Class__getByteLengthStatic" });
+ @export(MD5.hash, .{ .name = "MD5Class__hash" });
+ @export(MD5.update, .{ .name = "MD5Prototype__update" });
}
}
};
pub const JSMD4 = struct {
const MD4 = Classes.MD4;
- const GetterType = fn(*MD4, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*MD4, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*MD4, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*MD4, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*MD4, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*MD4, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -220,8 +195,8 @@ pub const JSMD4 = struct {
/// Modify the internal ptr to point to a new instance of MD4.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*MD4) bool {
- JSC.markBinding();
- return MD4__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return MD4__dangerouslySetPtr(value, ptr);
}
extern fn MD4__fromJS(JSC.JSValue) ?*MD4;
@@ -232,53 +207,42 @@ pub const JSMD4 = struct {
extern fn MD4__dangerouslySetPtr(JSC.JSValue, ?*MD4) bool;
comptime {
-
- if (@TypeOf(MD4.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD4)) {
- @compileLog("MD4.constructor is not a constructor");
+ if (@TypeOf(MD4.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD4)) {
+ @compileLog("MD4.constructor is not a constructor");
}
-
- if (@TypeOf(MD4.finalize) != (fn(*MD4) callconv(.C) void)) {
- @compileLog("MD4.finalize is not a finalizer");
+
+ if (@TypeOf(MD4.finalize) != (fn (*MD4) callconv(.C) void)) {
+ @compileLog("MD4.finalize is not a finalizer");
}
-
- if (@TypeOf(MD4.getByteLength) != GetterType)
- @compileLog(
- "Expected MD4.getByteLength to be a getter"
- );
-
- if (@TypeOf(MD4.digest) != CallbackType)
- @compileLog(
- "Expected MD4.digest to be a callback"
- );
- if (@TypeOf(MD4.update) != CallbackType)
- @compileLog(
- "Expected MD4.update to be a callback"
- );
- if (@TypeOf(MD4.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected MD4.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(MD4.hash) != StaticCallbackType)
- @compileLog(
- "Expected MD4.hash to be a static callback"
- );
+
+ if (@TypeOf(MD4.getByteLength) != GetterType)
+ @compileLog("Expected MD4.getByteLength to be a getter");
+
+ if (@TypeOf(MD4.digest) != CallbackType)
+ @compileLog("Expected MD4.digest to be a callback");
+ if (@TypeOf(MD4.update) != CallbackType)
+ @compileLog("Expected MD4.update to be a callback");
+ if (@TypeOf(MD4.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected MD4.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(MD4.hash) != StaticCallbackType)
+ @compileLog("Expected MD4.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(MD4.constructor, .{.name = "MD4Class__construct"});
- @export(MD4.digest, .{.name = "MD4Prototype__digest"});
- @export(MD4.finalize, .{.name = "MD4Class__finalize"});
- @export(MD4.getByteLength, .{.name = "MD4Prototype__getByteLength"});
- @export(MD4.getByteLengthStatic, .{.name = "MD4Class__getByteLengthStatic"});
- @export(MD4.hash, .{.name = "MD4Class__hash"});
- @export(MD4.update, .{.name = "MD4Prototype__update"});
+ @export(MD4.constructor, .{ .name = "MD4Class__construct" });
+ @export(MD4.digest, .{ .name = "MD4Prototype__digest" });
+ @export(MD4.finalize, .{ .name = "MD4Class__finalize" });
+ @export(MD4.getByteLength, .{ .name = "MD4Prototype__getByteLength" });
+ @export(MD4.getByteLengthStatic, .{ .name = "MD4Class__getByteLengthStatic" });
+ @export(MD4.hash, .{ .name = "MD4Class__hash" });
+ @export(MD4.update, .{ .name = "MD4Prototype__update" });
}
}
};
pub const JSSHA224 = struct {
const SHA224 = Classes.SHA224;
- const GetterType = fn(*SHA224, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA224, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA224, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA224, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA224, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA224, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -308,8 +272,8 @@ pub const JSSHA224 = struct {
/// Modify the internal ptr to point to a new instance of SHA224.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA224) bool {
- JSC.markBinding();
- return SHA224__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA224__dangerouslySetPtr(value, ptr);
}
extern fn SHA224__fromJS(JSC.JSValue) ?*SHA224;
@@ -320,53 +284,42 @@ pub const JSSHA224 = struct {
extern fn SHA224__dangerouslySetPtr(JSC.JSValue, ?*SHA224) bool;
comptime {
-
- if (@TypeOf(SHA224.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA224)) {
- @compileLog("SHA224.constructor is not a constructor");
+ if (@TypeOf(SHA224.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA224)) {
+ @compileLog("SHA224.constructor is not a constructor");
}
-
- if (@TypeOf(SHA224.finalize) != (fn(*SHA224) callconv(.C) void)) {
- @compileLog("SHA224.finalize is not a finalizer");
+
+ if (@TypeOf(SHA224.finalize) != (fn (*SHA224) callconv(.C) void)) {
+ @compileLog("SHA224.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA224.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA224.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA224.digest) != CallbackType)
- @compileLog(
- "Expected SHA224.digest to be a callback"
- );
- if (@TypeOf(SHA224.update) != CallbackType)
- @compileLog(
- "Expected SHA224.update to be a callback"
- );
- if (@TypeOf(SHA224.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA224.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA224.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA224.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA224.getByteLength) != GetterType)
+ @compileLog("Expected SHA224.getByteLength to be a getter");
+
+ if (@TypeOf(SHA224.digest) != CallbackType)
+ @compileLog("Expected SHA224.digest to be a callback");
+ if (@TypeOf(SHA224.update) != CallbackType)
+ @compileLog("Expected SHA224.update to be a callback");
+ if (@TypeOf(SHA224.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA224.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA224.hash) != StaticCallbackType)
+ @compileLog("Expected SHA224.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA224.constructor, .{.name = "SHA224Class__construct"});
- @export(SHA224.digest, .{.name = "SHA224Prototype__digest"});
- @export(SHA224.finalize, .{.name = "SHA224Class__finalize"});
- @export(SHA224.getByteLength, .{.name = "SHA224Prototype__getByteLength"});
- @export(SHA224.getByteLengthStatic, .{.name = "SHA224Class__getByteLengthStatic"});
- @export(SHA224.hash, .{.name = "SHA224Class__hash"});
- @export(SHA224.update, .{.name = "SHA224Prototype__update"});
+ @export(SHA224.constructor, .{ .name = "SHA224Class__construct" });
+ @export(SHA224.digest, .{ .name = "SHA224Prototype__digest" });
+ @export(SHA224.finalize, .{ .name = "SHA224Class__finalize" });
+ @export(SHA224.getByteLength, .{ .name = "SHA224Prototype__getByteLength" });
+ @export(SHA224.getByteLengthStatic, .{ .name = "SHA224Class__getByteLengthStatic" });
+ @export(SHA224.hash, .{ .name = "SHA224Class__hash" });
+ @export(SHA224.update, .{ .name = "SHA224Prototype__update" });
}
}
};
pub const JSSHA512 = struct {
const SHA512 = Classes.SHA512;
- const GetterType = fn(*SHA512, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA512, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA512, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA512, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA512, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA512, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -396,8 +349,8 @@ pub const JSSHA512 = struct {
/// Modify the internal ptr to point to a new instance of SHA512.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA512) bool {
- JSC.markBinding();
- return SHA512__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA512__dangerouslySetPtr(value, ptr);
}
extern fn SHA512__fromJS(JSC.JSValue) ?*SHA512;
@@ -408,53 +361,42 @@ pub const JSSHA512 = struct {
extern fn SHA512__dangerouslySetPtr(JSC.JSValue, ?*SHA512) bool;
comptime {
-
- if (@TypeOf(SHA512.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA512)) {
- @compileLog("SHA512.constructor is not a constructor");
+ if (@TypeOf(SHA512.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA512)) {
+ @compileLog("SHA512.constructor is not a constructor");
}
-
- if (@TypeOf(SHA512.finalize) != (fn(*SHA512) callconv(.C) void)) {
- @compileLog("SHA512.finalize is not a finalizer");
+
+ if (@TypeOf(SHA512.finalize) != (fn (*SHA512) callconv(.C) void)) {
+ @compileLog("SHA512.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA512.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA512.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA512.digest) != CallbackType)
- @compileLog(
- "Expected SHA512.digest to be a callback"
- );
- if (@TypeOf(SHA512.update) != CallbackType)
- @compileLog(
- "Expected SHA512.update to be a callback"
- );
- if (@TypeOf(SHA512.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA512.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA512.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA512.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA512.getByteLength) != GetterType)
+ @compileLog("Expected SHA512.getByteLength to be a getter");
+
+ if (@TypeOf(SHA512.digest) != CallbackType)
+ @compileLog("Expected SHA512.digest to be a callback");
+ if (@TypeOf(SHA512.update) != CallbackType)
+ @compileLog("Expected SHA512.update to be a callback");
+ if (@TypeOf(SHA512.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA512.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA512.hash) != StaticCallbackType)
+ @compileLog("Expected SHA512.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA512.constructor, .{.name = "SHA512Class__construct"});
- @export(SHA512.digest, .{.name = "SHA512Prototype__digest"});
- @export(SHA512.finalize, .{.name = "SHA512Class__finalize"});
- @export(SHA512.getByteLength, .{.name = "SHA512Prototype__getByteLength"});
- @export(SHA512.getByteLengthStatic, .{.name = "SHA512Class__getByteLengthStatic"});
- @export(SHA512.hash, .{.name = "SHA512Class__hash"});
- @export(SHA512.update, .{.name = "SHA512Prototype__update"});
+ @export(SHA512.constructor, .{ .name = "SHA512Class__construct" });
+ @export(SHA512.digest, .{ .name = "SHA512Prototype__digest" });
+ @export(SHA512.finalize, .{ .name = "SHA512Class__finalize" });
+ @export(SHA512.getByteLength, .{ .name = "SHA512Prototype__getByteLength" });
+ @export(SHA512.getByteLengthStatic, .{ .name = "SHA512Class__getByteLengthStatic" });
+ @export(SHA512.hash, .{ .name = "SHA512Class__hash" });
+ @export(SHA512.update, .{ .name = "SHA512Prototype__update" });
}
}
};
pub const JSSHA384 = struct {
const SHA384 = Classes.SHA384;
- const GetterType = fn(*SHA384, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA384, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA384, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA384, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA384, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA384, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -484,8 +426,8 @@ pub const JSSHA384 = struct {
/// Modify the internal ptr to point to a new instance of SHA384.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA384) bool {
- JSC.markBinding();
- return SHA384__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA384__dangerouslySetPtr(value, ptr);
}
extern fn SHA384__fromJS(JSC.JSValue) ?*SHA384;
@@ -496,53 +438,42 @@ pub const JSSHA384 = struct {
extern fn SHA384__dangerouslySetPtr(JSC.JSValue, ?*SHA384) bool;
comptime {
-
- if (@TypeOf(SHA384.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA384)) {
- @compileLog("SHA384.constructor is not a constructor");
+ if (@TypeOf(SHA384.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA384)) {
+ @compileLog("SHA384.constructor is not a constructor");
}
-
- if (@TypeOf(SHA384.finalize) != (fn(*SHA384) callconv(.C) void)) {
- @compileLog("SHA384.finalize is not a finalizer");
+
+ if (@TypeOf(SHA384.finalize) != (fn (*SHA384) callconv(.C) void)) {
+ @compileLog("SHA384.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA384.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA384.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA384.digest) != CallbackType)
- @compileLog(
- "Expected SHA384.digest to be a callback"
- );
- if (@TypeOf(SHA384.update) != CallbackType)
- @compileLog(
- "Expected SHA384.update to be a callback"
- );
- if (@TypeOf(SHA384.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA384.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA384.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA384.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA384.getByteLength) != GetterType)
+ @compileLog("Expected SHA384.getByteLength to be a getter");
+
+ if (@TypeOf(SHA384.digest) != CallbackType)
+ @compileLog("Expected SHA384.digest to be a callback");
+ if (@TypeOf(SHA384.update) != CallbackType)
+ @compileLog("Expected SHA384.update to be a callback");
+ if (@TypeOf(SHA384.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA384.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA384.hash) != StaticCallbackType)
+ @compileLog("Expected SHA384.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA384.constructor, .{.name = "SHA384Class__construct"});
- @export(SHA384.digest, .{.name = "SHA384Prototype__digest"});
- @export(SHA384.finalize, .{.name = "SHA384Class__finalize"});
- @export(SHA384.getByteLength, .{.name = "SHA384Prototype__getByteLength"});
- @export(SHA384.getByteLengthStatic, .{.name = "SHA384Class__getByteLengthStatic"});
- @export(SHA384.hash, .{.name = "SHA384Class__hash"});
- @export(SHA384.update, .{.name = "SHA384Prototype__update"});
+ @export(SHA384.constructor, .{ .name = "SHA384Class__construct" });
+ @export(SHA384.digest, .{ .name = "SHA384Prototype__digest" });
+ @export(SHA384.finalize, .{ .name = "SHA384Class__finalize" });
+ @export(SHA384.getByteLength, .{ .name = "SHA384Prototype__getByteLength" });
+ @export(SHA384.getByteLengthStatic, .{ .name = "SHA384Class__getByteLengthStatic" });
+ @export(SHA384.hash, .{ .name = "SHA384Class__hash" });
+ @export(SHA384.update, .{ .name = "SHA384Prototype__update" });
}
}
};
pub const JSSHA256 = struct {
const SHA256 = Classes.SHA256;
- const GetterType = fn(*SHA256, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA256, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA256, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA256, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA256, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA256, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -572,8 +503,8 @@ pub const JSSHA256 = struct {
/// Modify the internal ptr to point to a new instance of SHA256.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA256) bool {
- JSC.markBinding();
- return SHA256__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA256__dangerouslySetPtr(value, ptr);
}
extern fn SHA256__fromJS(JSC.JSValue) ?*SHA256;
@@ -584,53 +515,42 @@ pub const JSSHA256 = struct {
extern fn SHA256__dangerouslySetPtr(JSC.JSValue, ?*SHA256) bool;
comptime {
-
- if (@TypeOf(SHA256.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA256)) {
- @compileLog("SHA256.constructor is not a constructor");
+ if (@TypeOf(SHA256.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA256)) {
+ @compileLog("SHA256.constructor is not a constructor");
}
-
- if (@TypeOf(SHA256.finalize) != (fn(*SHA256) callconv(.C) void)) {
- @compileLog("SHA256.finalize is not a finalizer");
+
+ if (@TypeOf(SHA256.finalize) != (fn (*SHA256) callconv(.C) void)) {
+ @compileLog("SHA256.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA256.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA256.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA256.digest) != CallbackType)
- @compileLog(
- "Expected SHA256.digest to be a callback"
- );
- if (@TypeOf(SHA256.update) != CallbackType)
- @compileLog(
- "Expected SHA256.update to be a callback"
- );
- if (@TypeOf(SHA256.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA256.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA256.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA256.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA256.getByteLength) != GetterType)
+ @compileLog("Expected SHA256.getByteLength to be a getter");
+
+ if (@TypeOf(SHA256.digest) != CallbackType)
+ @compileLog("Expected SHA256.digest to be a callback");
+ if (@TypeOf(SHA256.update) != CallbackType)
+ @compileLog("Expected SHA256.update to be a callback");
+ if (@TypeOf(SHA256.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA256.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA256.hash) != StaticCallbackType)
+ @compileLog("Expected SHA256.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA256.constructor, .{.name = "SHA256Class__construct"});
- @export(SHA256.digest, .{.name = "SHA256Prototype__digest"});
- @export(SHA256.finalize, .{.name = "SHA256Class__finalize"});
- @export(SHA256.getByteLength, .{.name = "SHA256Prototype__getByteLength"});
- @export(SHA256.getByteLengthStatic, .{.name = "SHA256Class__getByteLengthStatic"});
- @export(SHA256.hash, .{.name = "SHA256Class__hash"});
- @export(SHA256.update, .{.name = "SHA256Prototype__update"});
+ @export(SHA256.constructor, .{ .name = "SHA256Class__construct" });
+ @export(SHA256.digest, .{ .name = "SHA256Prototype__digest" });
+ @export(SHA256.finalize, .{ .name = "SHA256Class__finalize" });
+ @export(SHA256.getByteLength, .{ .name = "SHA256Prototype__getByteLength" });
+ @export(SHA256.getByteLengthStatic, .{ .name = "SHA256Class__getByteLengthStatic" });
+ @export(SHA256.hash, .{ .name = "SHA256Class__hash" });
+ @export(SHA256.update, .{ .name = "SHA256Prototype__update" });
}
}
};
pub const JSSHA512_256 = struct {
const SHA512_256 = Classes.SHA512_256;
- const GetterType = fn(*SHA512_256, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*SHA512_256, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*SHA512_256, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*SHA512_256, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*SHA512_256, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*SHA512_256, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -660,8 +580,8 @@ pub const JSSHA512_256 = struct {
/// Modify the internal ptr to point to a new instance of SHA512_256.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*SHA512_256) bool {
- JSC.markBinding();
- return SHA512_256__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return SHA512_256__dangerouslySetPtr(value, ptr);
}
extern fn SHA512_256__fromJS(JSC.JSValue) ?*SHA512_256;
@@ -672,53 +592,42 @@ pub const JSSHA512_256 = struct {
extern fn SHA512_256__dangerouslySetPtr(JSC.JSValue, ?*SHA512_256) bool;
comptime {
-
- if (@TypeOf(SHA512_256.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA512_256)) {
- @compileLog("SHA512_256.constructor is not a constructor");
+ if (@TypeOf(SHA512_256.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*SHA512_256)) {
+ @compileLog("SHA512_256.constructor is not a constructor");
}
-
- if (@TypeOf(SHA512_256.finalize) != (fn(*SHA512_256) callconv(.C) void)) {
- @compileLog("SHA512_256.finalize is not a finalizer");
+
+ if (@TypeOf(SHA512_256.finalize) != (fn (*SHA512_256) callconv(.C) void)) {
+ @compileLog("SHA512_256.finalize is not a finalizer");
}
-
- if (@TypeOf(SHA512_256.getByteLength) != GetterType)
- @compileLog(
- "Expected SHA512_256.getByteLength to be a getter"
- );
-
- if (@TypeOf(SHA512_256.digest) != CallbackType)
- @compileLog(
- "Expected SHA512_256.digest to be a callback"
- );
- if (@TypeOf(SHA512_256.update) != CallbackType)
- @compileLog(
- "Expected SHA512_256.update to be a callback"
- );
- if (@TypeOf(SHA512_256.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected SHA512_256.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(SHA512_256.hash) != StaticCallbackType)
- @compileLog(
- "Expected SHA512_256.hash to be a static callback"
- );
+
+ if (@TypeOf(SHA512_256.getByteLength) != GetterType)
+ @compileLog("Expected SHA512_256.getByteLength to be a getter");
+
+ if (@TypeOf(SHA512_256.digest) != CallbackType)
+ @compileLog("Expected SHA512_256.digest to be a callback");
+ if (@TypeOf(SHA512_256.update) != CallbackType)
+ @compileLog("Expected SHA512_256.update to be a callback");
+ if (@TypeOf(SHA512_256.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected SHA512_256.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(SHA512_256.hash) != StaticCallbackType)
+ @compileLog("Expected SHA512_256.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(SHA512_256.constructor, .{.name = "SHA512_256Class__construct"});
- @export(SHA512_256.digest, .{.name = "SHA512_256Prototype__digest"});
- @export(SHA512_256.finalize, .{.name = "SHA512_256Class__finalize"});
- @export(SHA512_256.getByteLength, .{.name = "SHA512_256Prototype__getByteLength"});
- @export(SHA512_256.getByteLengthStatic, .{.name = "SHA512_256Class__getByteLengthStatic"});
- @export(SHA512_256.hash, .{.name = "SHA512_256Class__hash"});
- @export(SHA512_256.update, .{.name = "SHA512_256Prototype__update"});
+ @export(SHA512_256.constructor, .{ .name = "SHA512_256Class__construct" });
+ @export(SHA512_256.digest, .{ .name = "SHA512_256Prototype__digest" });
+ @export(SHA512_256.finalize, .{ .name = "SHA512_256Class__finalize" });
+ @export(SHA512_256.getByteLength, .{ .name = "SHA512_256Prototype__getByteLength" });
+ @export(SHA512_256.getByteLengthStatic, .{ .name = "SHA512_256Class__getByteLengthStatic" });
+ @export(SHA512_256.hash, .{ .name = "SHA512_256Class__hash" });
+ @export(SHA512_256.update, .{ .name = "SHA512_256Prototype__update" });
}
}
};
pub const JSMD5_SHA1 = struct {
const MD5_SHA1 = Classes.MD5_SHA1;
- const GetterType = fn(*MD5_SHA1, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*MD5_SHA1, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*MD5_SHA1, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*MD5_SHA1, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*MD5_SHA1, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*MD5_SHA1, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -748,8 +657,8 @@ pub const JSMD5_SHA1 = struct {
/// Modify the internal ptr to point to a new instance of MD5_SHA1.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*MD5_SHA1) bool {
- JSC.markBinding();
- return MD5_SHA1__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return MD5_SHA1__dangerouslySetPtr(value, ptr);
}
extern fn MD5_SHA1__fromJS(JSC.JSValue) ?*MD5_SHA1;
@@ -760,53 +669,42 @@ pub const JSMD5_SHA1 = struct {
extern fn MD5_SHA1__dangerouslySetPtr(JSC.JSValue, ?*MD5_SHA1) bool;
comptime {
-
- if (@TypeOf(MD5_SHA1.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD5_SHA1)) {
- @compileLog("MD5_SHA1.constructor is not a constructor");
+ if (@TypeOf(MD5_SHA1.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*MD5_SHA1)) {
+ @compileLog("MD5_SHA1.constructor is not a constructor");
}
-
- if (@TypeOf(MD5_SHA1.finalize) != (fn(*MD5_SHA1) callconv(.C) void)) {
- @compileLog("MD5_SHA1.finalize is not a finalizer");
+
+ if (@TypeOf(MD5_SHA1.finalize) != (fn (*MD5_SHA1) callconv(.C) void)) {
+ @compileLog("MD5_SHA1.finalize is not a finalizer");
}
-
- if (@TypeOf(MD5_SHA1.getByteLength) != GetterType)
- @compileLog(
- "Expected MD5_SHA1.getByteLength to be a getter"
- );
-
- if (@TypeOf(MD5_SHA1.digest) != CallbackType)
- @compileLog(
- "Expected MD5_SHA1.digest to be a callback"
- );
- if (@TypeOf(MD5_SHA1.update) != CallbackType)
- @compileLog(
- "Expected MD5_SHA1.update to be a callback"
- );
- if (@TypeOf(MD5_SHA1.getByteLengthStatic) != StaticGetterType)
- @compileLog(
- "Expected MD5_SHA1.getByteLengthStatic to be a static getter"
- );
-
- if (@TypeOf(MD5_SHA1.hash) != StaticCallbackType)
- @compileLog(
- "Expected MD5_SHA1.hash to be a static callback"
- );
+
+ if (@TypeOf(MD5_SHA1.getByteLength) != GetterType)
+ @compileLog("Expected MD5_SHA1.getByteLength to be a getter");
+
+ if (@TypeOf(MD5_SHA1.digest) != CallbackType)
+ @compileLog("Expected MD5_SHA1.digest to be a callback");
+ if (@TypeOf(MD5_SHA1.update) != CallbackType)
+ @compileLog("Expected MD5_SHA1.update to be a callback");
+ if (@TypeOf(MD5_SHA1.getByteLengthStatic) != StaticGetterType)
+ @compileLog("Expected MD5_SHA1.getByteLengthStatic to be a static getter");
+
+ if (@TypeOf(MD5_SHA1.hash) != StaticCallbackType)
+ @compileLog("Expected MD5_SHA1.hash to be a static callback");
if (!JSC.is_bindgen) {
-@export(MD5_SHA1.constructor, .{.name = "MD5_SHA1Class__construct"});
- @export(MD5_SHA1.digest, .{.name = "MD5_SHA1Prototype__digest"});
- @export(MD5_SHA1.finalize, .{.name = "MD5_SHA1Class__finalize"});
- @export(MD5_SHA1.getByteLength, .{.name = "MD5_SHA1Prototype__getByteLength"});
- @export(MD5_SHA1.getByteLengthStatic, .{.name = "MD5_SHA1Class__getByteLengthStatic"});
- @export(MD5_SHA1.hash, .{.name = "MD5_SHA1Class__hash"});
- @export(MD5_SHA1.update, .{.name = "MD5_SHA1Prototype__update"});
+ @export(MD5_SHA1.constructor, .{ .name = "MD5_SHA1Class__construct" });
+ @export(MD5_SHA1.digest, .{ .name = "MD5_SHA1Prototype__digest" });
+ @export(MD5_SHA1.finalize, .{ .name = "MD5_SHA1Class__finalize" });
+ @export(MD5_SHA1.getByteLength, .{ .name = "MD5_SHA1Prototype__getByteLength" });
+ @export(MD5_SHA1.getByteLengthStatic, .{ .name = "MD5_SHA1Class__getByteLengthStatic" });
+ @export(MD5_SHA1.hash, .{ .name = "MD5_SHA1Class__hash" });
+ @export(MD5_SHA1.update, .{ .name = "MD5_SHA1Prototype__update" });
}
}
};
pub const JSRequest = struct {
const Request = Classes.Request;
- const GetterType = fn(*Request, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*Request, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*Request, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*Request, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*Request, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*Request, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -836,8 +734,8 @@ pub const JSRequest = struct {
/// Modify the internal ptr to point to a new instance of Request.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*Request) bool {
- JSC.markBinding();
- return Request__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return Request__dangerouslySetPtr(value, ptr);
}
extern fn Request__fromJS(JSC.JSValue) ?*Request;
@@ -848,123 +746,88 @@ pub const JSRequest = struct {
extern fn Request__dangerouslySetPtr(JSC.JSValue, ?*Request) bool;
comptime {
-
- if (@TypeOf(Request.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*Request)) {
- @compileLog("Request.constructor is not a constructor");
+ if (@TypeOf(Request.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*Request)) {
+ @compileLog("Request.constructor is not a constructor");
}
-
- if (@TypeOf(Request.finalize) != (fn(*Request) callconv(.C) void)) {
- @compileLog("Request.finalize is not a finalizer");
+
+ if (@TypeOf(Request.finalize) != (fn (*Request) callconv(.C) void)) {
+ @compileLog("Request.finalize is not a finalizer");
}
-
- if (@TypeOf(Request.getArrayBuffer) != CallbackType)
- @compileLog(
- "Expected Request.getArrayBuffer to be a callback"
- );
- if (@TypeOf(Request.getBlob) != CallbackType)
- @compileLog(
- "Expected Request.getBlob to be a callback"
- );
- if (@TypeOf(Request.getBodyUsed) != GetterType)
- @compileLog(
- "Expected Request.getBodyUsed to be a getter"
- );
-
- if (@TypeOf(Request.getCache) != GetterType)
- @compileLog(
- "Expected Request.getCache to be a getter"
- );
-
- if (@TypeOf(Request.doClone) != CallbackType)
- @compileLog(
- "Expected Request.doClone to be a callback"
- );
- if (@TypeOf(Request.getCredentials) != GetterType)
- @compileLog(
- "Expected Request.getCredentials to be a getter"
- );
-
- if (@TypeOf(Request.getDestination) != GetterType)
- @compileLog(
- "Expected Request.getDestination to be a getter"
- );
-
- if (@TypeOf(Request.getHeaders) != GetterType)
- @compileLog(
- "Expected Request.getHeaders to be a getter"
- );
-
- if (@TypeOf(Request.getIntegrity) != GetterType)
- @compileLog(
- "Expected Request.getIntegrity to be a getter"
- );
-
- if (@TypeOf(Request.getJSON) != CallbackType)
- @compileLog(
- "Expected Request.getJSON to be a callback"
- );
- if (@TypeOf(Request.getMethod) != GetterType)
- @compileLog(
- "Expected Request.getMethod to be a getter"
- );
-
- if (@TypeOf(Request.getMode) != GetterType)
- @compileLog(
- "Expected Request.getMode to be a getter"
- );
-
- if (@TypeOf(Request.getRedirect) != GetterType)
- @compileLog(
- "Expected Request.getRedirect to be a getter"
- );
-
- if (@TypeOf(Request.getReferrer) != GetterType)
- @compileLog(
- "Expected Request.getReferrer to be a getter"
- );
-
- if (@TypeOf(Request.getReferrerPolicy) != GetterType)
- @compileLog(
- "Expected Request.getReferrerPolicy to be a getter"
- );
-
- if (@TypeOf(Request.getText) != CallbackType)
- @compileLog(
- "Expected Request.getText to be a callback"
- );
- if (@TypeOf(Request.getUrl) != GetterType)
- @compileLog(
- "Expected Request.getUrl to be a getter"
- );
+
+ if (@TypeOf(Request.getArrayBuffer) != CallbackType)
+ @compileLog("Expected Request.getArrayBuffer to be a callback");
+ if (@TypeOf(Request.getBlob) != CallbackType)
+ @compileLog("Expected Request.getBlob to be a callback");
+ if (@TypeOf(Request.getBodyUsed) != GetterType)
+ @compileLog("Expected Request.getBodyUsed to be a getter");
+
+ if (@TypeOf(Request.getCache) != GetterType)
+ @compileLog("Expected Request.getCache to be a getter");
+
+ if (@TypeOf(Request.doClone) != CallbackType)
+ @compileLog("Expected Request.doClone to be a callback");
+ if (@TypeOf(Request.getCredentials) != GetterType)
+ @compileLog("Expected Request.getCredentials to be a getter");
+
+ if (@TypeOf(Request.getDestination) != GetterType)
+ @compileLog("Expected Request.getDestination to be a getter");
+
+ if (@TypeOf(Request.getHeaders) != GetterType)
+ @compileLog("Expected Request.getHeaders to be a getter");
+
+ if (@TypeOf(Request.getIntegrity) != GetterType)
+ @compileLog("Expected Request.getIntegrity to be a getter");
+
+ if (@TypeOf(Request.getJSON) != CallbackType)
+ @compileLog("Expected Request.getJSON to be a callback");
+ if (@TypeOf(Request.getMethod) != GetterType)
+ @compileLog("Expected Request.getMethod to be a getter");
+
+ if (@TypeOf(Request.getMode) != GetterType)
+ @compileLog("Expected Request.getMode to be a getter");
+
+ if (@TypeOf(Request.getRedirect) != GetterType)
+ @compileLog("Expected Request.getRedirect to be a getter");
+
+ if (@TypeOf(Request.getReferrer) != GetterType)
+ @compileLog("Expected Request.getReferrer to be a getter");
+
+ if (@TypeOf(Request.getReferrerPolicy) != GetterType)
+ @compileLog("Expected Request.getReferrerPolicy to be a getter");
+
+ if (@TypeOf(Request.getText) != CallbackType)
+ @compileLog("Expected Request.getText to be a callback");
+ if (@TypeOf(Request.getUrl) != GetterType)
+ @compileLog("Expected Request.getUrl to be a getter");
if (!JSC.is_bindgen) {
-@export(Request.constructor, .{.name = "RequestClass__construct"});
- @export(Request.doClone, .{.name = "RequestPrototype__doClone"});
- @export(Request.finalize, .{.name = "RequestClass__finalize"});
- @export(Request.getArrayBuffer, .{.name = "RequestPrototype__getArrayBuffer"});
- @export(Request.getBlob, .{.name = "RequestPrototype__getBlob"});
- @export(Request.getBodyUsed, .{.name = "RequestPrototype__getBodyUsed"});
- @export(Request.getCache, .{.name = "RequestPrototype__getCache"});
- @export(Request.getCredentials, .{.name = "RequestPrototype__getCredentials"});
- @export(Request.getDestination, .{.name = "RequestPrototype__getDestination"});
- @export(Request.getHeaders, .{.name = "RequestPrototype__getHeaders"});
- @export(Request.getIntegrity, .{.name = "RequestPrototype__getIntegrity"});
- @export(Request.getJSON, .{.name = "RequestPrototype__getJSON"});
- @export(Request.getMethod, .{.name = "RequestPrototype__getMethod"});
- @export(Request.getMode, .{.name = "RequestPrototype__getMode"});
- @export(Request.getRedirect, .{.name = "RequestPrototype__getRedirect"});
- @export(Request.getReferrer, .{.name = "RequestPrototype__getReferrer"});
- @export(Request.getReferrerPolicy, .{.name = "RequestPrototype__getReferrerPolicy"});
- @export(Request.getText, .{.name = "RequestPrototype__getText"});
- @export(Request.getUrl, .{.name = "RequestPrototype__getUrl"});
+ @export(Request.constructor, .{ .name = "RequestClass__construct" });
+ @export(Request.doClone, .{ .name = "RequestPrototype__doClone" });
+ @export(Request.finalize, .{ .name = "RequestClass__finalize" });
+ @export(Request.getArrayBuffer, .{ .name = "RequestPrototype__getArrayBuffer" });
+ @export(Request.getBlob, .{ .name = "RequestPrototype__getBlob" });
+ @export(Request.getBodyUsed, .{ .name = "RequestPrototype__getBodyUsed" });
+ @export(Request.getCache, .{ .name = "RequestPrototype__getCache" });
+ @export(Request.getCredentials, .{ .name = "RequestPrototype__getCredentials" });
+ @export(Request.getDestination, .{ .name = "RequestPrototype__getDestination" });
+ @export(Request.getHeaders, .{ .name = "RequestPrototype__getHeaders" });
+ @export(Request.getIntegrity, .{ .name = "RequestPrototype__getIntegrity" });
+ @export(Request.getJSON, .{ .name = "RequestPrototype__getJSON" });
+ @export(Request.getMethod, .{ .name = "RequestPrototype__getMethod" });
+ @export(Request.getMode, .{ .name = "RequestPrototype__getMode" });
+ @export(Request.getRedirect, .{ .name = "RequestPrototype__getRedirect" });
+ @export(Request.getReferrer, .{ .name = "RequestPrototype__getReferrer" });
+ @export(Request.getReferrerPolicy, .{ .name = "RequestPrototype__getReferrerPolicy" });
+ @export(Request.getText, .{ .name = "RequestPrototype__getText" });
+ @export(Request.getUrl, .{ .name = "RequestPrototype__getUrl" });
}
}
};
pub const JSResponse = struct {
const Response = Classes.Response;
- const GetterType = fn(*Response, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
- const SetterType = fn(*Response, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
- const CallbackType = fn(*Response, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
+ const GetterType = fn (*Response, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue;
+ const SetterType = fn (*Response, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool;
+ const CallbackType = fn (*Response, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue;
/// Return the pointer to the wrapped object.
/// If the object does not match the type, return null.
@@ -994,8 +857,8 @@ pub const JSResponse = struct {
/// Modify the internal ptr to point to a new instance of Response.
pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*Response) bool {
- JSC.markBinding();
- return Response__dangerouslySetPtr(value, ptr);
+ JSC.markBinding();
+ return Response__dangerouslySetPtr(value, ptr);
}
extern fn Response__fromJS(JSC.JSValue) ?*Response;
@@ -1006,100 +869,69 @@ pub const JSResponse = struct {
extern fn Response__dangerouslySetPtr(JSC.JSValue, ?*Response) bool;
comptime {
-
- if (@TypeOf(Response.constructor) != (fn(*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*Response)) {
- @compileLog("Response.constructor is not a constructor");
+ if (@TypeOf(Response.constructor) != (fn (*JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) ?*Response)) {
+ @compileLog("Response.constructor is not a constructor");
}
-
- if (@TypeOf(Response.finalize) != (fn(*Response) callconv(.C) void)) {
- @compileLog("Response.finalize is not a finalizer");
+
+ if (@TypeOf(Response.finalize) != (fn (*Response) callconv(.C) void)) {
+ @compileLog("Response.finalize is not a finalizer");
}
-
- if (@TypeOf(Response.getArrayBuffer) != CallbackType)
- @compileLog(
- "Expected Response.getArrayBuffer to be a callback"
- );
- if (@TypeOf(Response.getBlob) != CallbackType)
- @compileLog(
- "Expected Response.getBlob to be a callback"
- );
- if (@TypeOf(Response.getBodyUsed) != GetterType)
- @compileLog(
- "Expected Response.getBodyUsed to be a getter"
- );
-
- if (@TypeOf(Response.doClone) != CallbackType)
- @compileLog(
- "Expected Response.doClone to be a callback"
- );
- if (@TypeOf(Response.getHeaders) != GetterType)
- @compileLog(
- "Expected Response.getHeaders to be a getter"
- );
-
- if (@TypeOf(Response.getJSON) != CallbackType)
- @compileLog(
- "Expected Response.getJSON to be a callback"
- );
- if (@TypeOf(Response.getOK) != GetterType)
- @compileLog(
- "Expected Response.getOK to be a getter"
- );
-
- if (@TypeOf(Response.getStatus) != GetterType)
- @compileLog(
- "Expected Response.getStatus to be a getter"
- );
-
- if (@TypeOf(Response.getStatusText) != GetterType)
- @compileLog(
- "Expected Response.getStatusText to be a getter"
- );
-
- if (@TypeOf(Response.getText) != CallbackType)
- @compileLog(
- "Expected Response.getText to be a callback"
- );
- if (@TypeOf(Response.getResponseType) != GetterType)
- @compileLog(
- "Expected Response.getResponseType to be a getter"
- );
-
- if (@TypeOf(Response.getURL) != GetterType)
- @compileLog(
- "Expected Response.getURL to be a getter"
- );
-
- if (@TypeOf(Response.constructError) != StaticCallbackType)
- @compileLog(
- "Expected Response.constructError to be a static callback"
- );
- if (@TypeOf(Response.constructJSON) != StaticCallbackType)
- @compileLog(
- "Expected Response.constructJSON to be a static callback"
- );
- if (@TypeOf(Response.constructRedirect) != StaticCallbackType)
- @compileLog(
- "Expected Response.constructRedirect to be a static callback"
- );
+
+ if (@TypeOf(Response.getArrayBuffer) != CallbackType)
+ @compileLog("Expected Response.getArrayBuffer to be a callback");
+ if (@TypeOf(Response.getBlob) != CallbackType)
+ @compileLog("Expected Response.getBlob to be a callback");
+ if (@TypeOf(Response.getBodyUsed) != GetterType)
+ @compileLog("Expected Response.getBodyUsed to be a getter");
+
+ if (@TypeOf(Response.doClone) != CallbackType)
+ @compileLog("Expected Response.doClone to be a callback");
+ if (@TypeOf(Response.getHeaders) != GetterType)
+ @compileLog("Expected Response.getHeaders to be a getter");
+
+ if (@TypeOf(Response.getJSON) != CallbackType)
+ @compileLog("Expected Response.getJSON to be a callback");
+ if (@TypeOf(Response.getOK) != GetterType)
+ @compileLog("Expected Response.getOK to be a getter");
+
+ if (@TypeOf(Response.getStatus) != GetterType)
+ @compileLog("Expected Response.getStatus to be a getter");
+
+ if (@TypeOf(Response.getStatusText) != GetterType)
+ @compileLog("Expected Response.getStatusText to be a getter");
+
+ if (@TypeOf(Response.getText) != CallbackType)
+ @compileLog("Expected Response.getText to be a callback");
+ if (@TypeOf(Response.getResponseType) != GetterType)
+ @compileLog("Expected Response.getResponseType to be a getter");
+
+ if (@TypeOf(Response.getURL) != GetterType)
+ @compileLog("Expected Response.getURL to be a getter");
+
+ if (@TypeOf(Response.constructError) != StaticCallbackType)
+ @compileLog("Expected Response.constructError to be a static callback");
+ if (@TypeOf(Response.constructJSON) != StaticCallbackType)
+ @compileLog("Expected Response.constructJSON to be a static callback");
+ if (@TypeOf(Response.constructRedirect) != StaticCallbackType)
+ @compileLog("Expected Response.constructRedirect to be a static callback");
if (!JSC.is_bindgen) {
-@export(Response.constructError, .{.name = "ResponseClass__constructError"});
- @export(Response.constructJSON, .{.name = "ResponseClass__constructJSON"});
- @export(Response.constructor, .{.name = "ResponseClass__construct"});
- @export(Response.constructRedirect, .{.name = "ResponseClass__constructRedirect"});
- @export(Response.doClone, .{.name = "ResponsePrototype__doClone"});
- @export(Response.finalize, .{.name = "ResponseClass__finalize"});
- @export(Response.getArrayBuffer, .{.name = "ResponsePrototype__getArrayBuffer"});
- @export(Response.getBlob, .{.name = "ResponsePrototype__getBlob"});
- @export(Response.getBodyUsed, .{.name = "ResponsePrototype__getBodyUsed"});
- @export(Response.getHeaders, .{.name = "ResponsePrototype__getHeaders"});
- @export(Response.getJSON, .{.name = "ResponsePrototype__getJSON"});
- @export(Response.getOK, .{.name = "ResponsePrototype__getOK"});
- @export(Response.getResponseType, .{.name = "ResponsePrototype__getResponseType"});
- @export(Response.getStatus, .{.name = "ResponsePrototype__getStatus"});
- @export(Response.getStatusText, .{.name = "ResponsePrototype__getStatusText"});
- @export(Response.getText, .{.name = "ResponsePrototype__getText"});
- @export(Response.getURL, .{.name = "ResponsePrototype__getURL"});
+ @export(Response.constructError, .{ .name = "ResponseClass__constructError" });
+ @export(Response.constructJSON, .{ .name = "ResponseClass__constructJSON" });
+ @export(Response.constructor, .{ .name = "ResponseClass__construct" });
+ @export(Response.constructRedirect, .{ .name = "ResponseClass__constructRedirect" });
+ @export(Response.doClone, .{ .name = "ResponsePrototype__doClone" });
+ @export(Response.finalize, .{ .name = "ResponseClass__finalize" });
+ @export(Response.getArrayBuffer, .{ .name = "ResponsePrototype__getArrayBuffer" });
+ @export(Response.getBlob, .{ .name = "ResponsePrototype__getBlob" });
+ @export(Response.getBodyUsed, .{ .name = "ResponsePrototype__getBodyUsed" });
+ @export(Response.getHeaders, .{ .name = "ResponsePrototype__getHeaders" });
+ @export(Response.getJSON, .{ .name = "ResponsePrototype__getJSON" });
+ @export(Response.getOK, .{ .name = "ResponsePrototype__getOK" });
+ @export(Response.getResponseType, .{ .name = "ResponsePrototype__getResponseType" });
+ @export(Response.getStatus, .{ .name = "ResponsePrototype__getStatus" });
+ @export(Response.getStatusText, .{ .name = "ResponsePrototype__getStatusText" });
+ @export(Response.getText, .{ .name = "ResponsePrototype__getText" });
+ @export(Response.getURL, .{ .name = "ResponsePrototype__getURL" });
}
}
-}; \ No newline at end of file
+};