Skip to content

Instantly share code, notes, and snippets.

View jdm's full-sized avatar

Josh Matthews jdm

View GitHub Profile
feature count
PageVisits 10
V8SloppyMode 9
SecureContextCheckFailed 8
V8StrictMode 7
SecureContextCheckPassed 7
ContentSecurityPolicy 6
WorkerSubjectToCSP 5
SameOriginOtherScript 5
PrefixedDevicePixelRatioMediaFeature 4
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#![allow(unreachable_code,non_camel_case_types,non_upper_case_globals,unused_parens,unused_imports,unused_variables,unused_unsafe,unused_mut,unused_assignments,dead_code)]
use dom::bindings;
use dom::bindings::callback::wrap_call_this_object;
use dom::bindings::callback::{CallSetup,ExceptionHandling};
use dom::bindings::callback::{CallbackContainer,CallbackInterface,CallbackFunction};
use dom::bindings::codegen::Bindings::*;
use dom::bindings::codegen::{PrototypeList, RegisterBindings, UnionTypes};
use dom::bindings::conversions::DOM_OBJECT_SLOT;
@jdm
jdm / gist:9332689
Last active August 29, 2015 13:56 — forked from pcwalton/gist:9280996
#[feature(macro_rules)];
use std::cast;
trait RootedReference<T> {
fn root_ref<'a>(&'a self) -> Option<JSRef<'a, T>>;
}
impl<T> RootedReference<T> for Option<Rooted<T>> {
fn root_ref<'a>(&'a self) -> Option<JSRef<'a, T>> {
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glext.h>
typedef void (*shaderfunc)(GLuint shader, GLsizei count, const char** str, const GLint* length);
int main(int argc, char **argv) {
shaderfunc f = glShaderSource;
return 0;
}