Skip to content

Commit

Permalink
library add c_require
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlma committed Feb 14, 2016
1 parent 7ecbd7b commit fa4c342
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion uv/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import os
import sys
import weakref

from collections import namedtuple

Expand Down Expand Up @@ -144,4 +145,14 @@ def uv_buffers(self):
"""
:rtype: ffi.CData
"""
return self[1]
return self[1]


_c_dependencies = weakref.WeakKeyDictionary()


def c_require(structure, *requirements):
try:
_c_dependencies[structure].append(requirements)
except KeyError:
_c_dependencies[structure] = [requirements]

0 comments on commit fa4c342

Please sign in to comment.